diff options
| author | Kleidi Bujari <mail@4kb.net> | 2025-01-24 12:14:23 -0500 |
|---|---|---|
| committer | Kleidi Bujari <mail@4kb.net> | 2025-01-24 12:14:23 -0500 |
| commit | 32f4cb5cbba313b7af2fce46139c04d9469cb72a (patch) | |
| tree | 3cc7da05d4320a8f89a726d67811110771dae1bf /machines/radon/pxeboot.nix | |
| parent | 8271e2b89180578ab4dd9ed9eb37142254e5a148 (diff) | |
| download | depot-32f4cb5cbba313b7af2fce46139c04d9469cb72a.tar.gz depot-32f4cb5cbba313b7af2fce46139c04d9469cb72a.tar.bz2 depot-32f4cb5cbba313b7af2fce46139c04d9469cb72a.zip | |
25-jan sprint
Diffstat (limited to 'machines/radon/pxeboot.nix')
| -rw-r--r-- | machines/radon/pxeboot.nix | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/machines/radon/pxeboot.nix b/machines/radon/pxeboot.nix new file mode 100644 index 0000000..4d897c3 --- /dev/null +++ b/machines/radon/pxeboot.nix @@ -0,0 +1,48 @@ +{ pkgs, lib, ... }: +let + installer = lib.nixosSystem { + system = "x86_64-linux"; + modules = [ + ({ config, pkgs, lib, modulesPath, ... }: { + imports = [ + (modulesPath + "/installer/netboot/netboot-minimal.nix") + (modulesPath + "/installer/cd-dvd/channel.nix") + ]; + + services.openssh = { + enable = true; + openFirewall = true; + settings = { + PasswordAuthentication = false; + KbdInteractiveAuthentication = false; + }; + }; + + nix.settings = { + experimental-features = [ "nix-command" "flakes" ]; + }; + + users.users.root.openssh.authorizedKeys.keys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIP7T2uWJFUu8aFZZgQusGKyEMocb2pKbHLDad2eIJus9" + ]; + }) + ]; + }; + + inherit (installer.config.system) build; +in +{ + services.pixiecore = { + enable = true; + openFirewall = true; + kernel = "${build.kernel}/bzImage"; + initrd = "${build.netbootRamdisk}/initrd"; + cmdLine = "init=${build.toplevel}/init loglevel=4"; + mode = "boot"; + port = 8001; + statusPort = 8001; + + # Piggyback on existing network DHCP + dhcpNoBind = true; + }; +} |
