diff options
| author | Mike Vink <ivi@vinkies.net> | 2024-10-12 17:15:08 +0000 |
|---|---|---|
| committer | Mike Vink <ivi@vinkies.net> | 2024-10-12 17:15:08 +0000 |
| commit | f26c55d5bea46e0b4c0bed3ef3a1258b1b9e82dc (patch) | |
| tree | 4a0f2284ae05771568efe2dbc323233c10f444bd /profiles/netboot | |
| parent | 7134976e1bd1ab8f6f0a85e9efe23b85f0d54250 (diff) | |
update
Diffstat (limited to 'profiles/netboot')
| -rw-r--r-- | profiles/netboot/system.nix | 44 |
1 files changed, 12 insertions, 32 deletions
diff --git a/profiles/netboot/system.nix b/profiles/netboot/system.nix index 7dfa6d5..b0e7945 100644 --- a/profiles/netboot/system.nix +++ b/profiles/netboot/system.nix @@ -1,49 +1,29 @@ -# sys: { pkgs, lib, ... }: let -# run-pixiecore = let -# build = sys.config.system.build; -# in pkgs.writeShellApplication { -# name = "run-pixiecore"; -# text = '' -# sudo ${pkgs.pixiecore}/bin/pixiecore \ -# boot kernel/bzImage initrd/initrd \ -# --cmdline "init=init/init loglevel=4" \ -# --debug --dhcp-no-bind \ -# --port 64172 --status-port 64172 "$@" -# ''; -# }; -# build-pixie = pkgs.writeShellApplication { -# name = "build-pixie"; -# text = '' -# nix build /nix-config\#nixosConfigurations."$1".config.system.build.kernel --impure -o kernel -# nix build /nix-config\#nixosConfigurations."$1".config.system.build.toplevel --impure -o init -# nix build /nix-config\#nixosConfigurations."$1".config.system.build.netbootRamdisk --impure -o initrd -# ''; -# }; -# in { -# networking.firewall.allowedUDPPorts = [ 67 69 4011 ]; -# networking.firewall.allowedTCPPorts = [ 64172 ]; -# environment.systemPackages = [ -# run-pixiecore -# build-pixie -# ]; -# } sys: { pkgs, lib, ... }: let run-pixiecore = let build = sys.config.system.build; in pkgs.writeShellApplication { name = "run-pixiecore"; text = '' - exec ${pkgs.pixiecore}/bin/pixiecore \ - boot ${build.kernel}/bzImage ${build.netbootRamdisk}/initrd \ - --cmdline "init=${build.toplevel}/init loglevel=4" \ + sudo ${pkgs.pixiecore}/bin/pixiecore \ + boot kernel/bzImage initrd/initrd \ + --cmdline "init=init/init loglevel=4" \ --debug --dhcp-no-bind \ --port 64172 --status-port 64172 "$@" ''; }; + build-pixie = pkgs.writeShellApplication { + name = "build-pixie"; + text = '' + nix build /nix-config\#nixosConfigurations."$1".config.system.build.kernel --impure -o kernel + nix build /nix-config\#nixosConfigurations."$1".config.system.build.toplevel --impure -o init + nix build /nix-config\#nixosConfigurations."$1".config.system.build.netbootRamdisk --impure -o initrd + ''; + }; in { networking.firewall.allowedUDPPorts = [ 67 69 4011 ]; networking.firewall.allowedTCPPorts = [ 64172 ]; environment.systemPackages = [ run-pixiecore + build-pixie ]; } |
