hpc-cluster/ipxe.nix

41 lines
915 B
Nix

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;
}