summary refs log tree commit diff
diff options
context:
space:
mode:
authorMichael Hoang <enzime@users.noreply.github.com>2021-12-12 13:34:55 +1100
committerMichael Hoang <enzime@users.noreply.github.com>2021-12-23 18:57:02 +1100
commit7e7510de4ac5892157145d68582137425b894382 (patch)
tree44cb20db3982a9f2fabe0e9b4041c29618ca493b
parentd8d68fe609adfd52f0d0f9b00427d5733c1b4ef6 (diff)
downloadnixpkgs-7e7510de4ac5892157145d68582137425b894382.tar
nixpkgs-7e7510de4ac5892157145d68582137425b894382.tar.gz
nixpkgs-7e7510de4ac5892157145d68582137425b894382.tar.bz2
nixpkgs-7e7510de4ac5892157145d68582137425b894382.tar.lz
nixpkgs-7e7510de4ac5892157145d68582137425b894382.tar.xz
nixpkgs-7e7510de4ac5892157145d68582137425b894382.tar.zst
nixpkgs-7e7510de4ac5892157145d68582137425b894382.zip
netboot: Support cmdline variable from netboot.xyz
-rw-r--r--nixos/modules/installer/netboot/netboot.nix4
1 files changed, 3 insertions, 1 deletions
diff --git a/nixos/modules/installer/netboot/netboot.nix b/nixos/modules/installer/netboot/netboot.nix
index 145f71b5d0c..a459e7304cd 100644
--- a/nixos/modules/installer/netboot/netboot.nix
+++ b/nixos/modules/installer/netboot/netboot.nix
@@ -94,7 +94,9 @@ with lib;
 
     system.build.netbootIpxeScript = pkgs.writeTextDir "netboot.ipxe" ''
       #!ipxe
-      kernel ${pkgs.stdenv.hostPlatform.linux-kernel.target} init=${config.system.build.toplevel}/init initrd=initrd ${toString config.boot.kernelParams}
+      # Use the cmdline variable to allow the user to specify custom kernel params
+      # when chainloading this script from other iPXE scripts like netboot.xyz
+      kernel ${pkgs.stdenv.hostPlatform.linux-kernel.target} init=${config.system.build.toplevel}/init initrd=initrd ${toString config.boot.kernelParams} ''${cmdline}
       initrd initrd
       boot
     '';