summaryrefslogtreecommitdiff
path: root/profiles
diff options
context:
space:
mode:
authorMike Vink <mike@pionative.com>2024-07-18 08:38:51 +0200
committerMike Vink <mike@pionative.com>2024-07-18 08:39:30 +0200
commit13c3bd8573543493df392bc21630960029c921d2 (patch)
treed5f920fab8acc5e4189abf82b8fd0d5e3c9e446d /profiles
parent38c087f5edef8e4b0aabf3667c150c628b1d9f45 (diff)
split script for netboot
Diffstat (limited to 'profiles')
-rw-r--r--profiles/netboot/system.nix15
1 files changed, 12 insertions, 3 deletions
diff --git a/profiles/netboot/system.nix b/profiles/netboot/system.nix
index 528b547..b0e7945 100644
--- a/profiles/netboot/system.nix
+++ b/profiles/netboot/system.nix
@@ -4,17 +4,26 @@ sys: { pkgs, lib, ... }: let
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
];
}