hpc-cluster/ipxe.nix

41 lines
915 B
Nix
Raw Permalink Normal View History

2020-02-08 00:01:31 +00:00
let
nixpkgs = <nixpkgs>;
pkgs = import nixpkgs {};
cluster = (import ./cluster.nix);
configuration = { config, pkgs, lib, ... }: with lib; {
imports = [
"${nixpkgs}/nixos/modules/installer/netboot/netboot-minimal.nix"
];
systemd.services.sshd.wantedBy = mkOverride 0 [ "multi-user.target" ];
networking.hostName = "";
users.users.root = {
openssh.authorizedKeys.keys = cluster.keys;
initialPassword = "root";
};
virtualisation.docker.enable = true;
i18n.consoleKeyMap = "de";
environment.systemPackages = with pkgs; [
(import ./bin/tw_cli.nix)
];
};
nixos = import "${nixpkgs}/nixos" {
inherit configuration;
# system = ...;
};
in
pkgs.symlinkJoin {
name = "netboot";
paths = with nixos.config.system.build; [
netbootRamdisk
kernel
netbootIpxeScript
];
preferLocalBuild = true;
}