about summary refs log tree commit diff
path: root/nixos/modules/installer
diff options
context:
space:
mode:
authorGraham Christensen <graham@grahamc.com>2017-12-12 17:44:07 -0500
committerGitHub <noreply@github.com>2017-12-12 17:44:07 -0500
commit3cad1abf9e5e8a4e0b38270b1d7c7cd89a97e92b (patch)
tree166243b2aee6921a0794e77168a64b4d1e620ed0 /nixos/modules/installer
parent04d3d19158b0ecff8dfedd8c9cdd78775063bc4b (diff)
parent08b8bc24cb818d78971f6cb941b7991e54c6971b (diff)
downloadnixlib-3cad1abf9e5e8a4e0b38270b1d7c7cd89a97e92b.tar
nixlib-3cad1abf9e5e8a4e0b38270b1d7c7cd89a97e92b.tar.gz
nixlib-3cad1abf9e5e8a4e0b38270b1d7c7cd89a97e92b.tar.bz2
nixlib-3cad1abf9e5e8a4e0b38270b1d7c7cd89a97e92b.tar.lz
nixlib-3cad1abf9e5e8a4e0b38270b1d7c7cd89a97e92b.tar.xz
nixlib-3cad1abf9e5e8a4e0b38270b1d7c7cd89a97e92b.tar.zst
nixlib-3cad1abf9e5e8a4e0b38270b1d7c7cd89a97e92b.zip
Merge pull request #32031 from NixOS/unstable-aarch64
Aarch64 Netboot
Diffstat (limited to 'nixos/modules/installer')
-rw-r--r--nixos/modules/installer/netboot/netboot.nix19
1 files changed, 12 insertions, 7 deletions
diff --git a/nixos/modules/installer/netboot/netboot.nix b/nixos/modules/installer/netboot/netboot.nix
index 0f6046339b37..52239b619126 100644
--- a/nixos/modules/installer/netboot/netboot.nix
+++ b/nixos/modules/installer/netboot/netboot.nix
@@ -18,17 +18,17 @@ with lib;
 
   };
 
-  config = {
-
-    boot.loader.grub.version = 2;
-
+  config = rec {
     # Don't build the GRUB menu builder script, since we don't need it
     # here and it causes a cyclic dependency.
     boot.loader.grub.enable = false;
 
     # !!! Hack - attributes expected by other modules.
-    system.boot.loader.kernelFile = "bzImage";
-    environment.systemPackages = [ pkgs.grub2 pkgs.grub2_efi pkgs.syslinux ];
+    environment.systemPackages = [ pkgs.grub2_efi ]
+      ++ (if pkgs.stdenv.system == "aarch64-linux"
+          then []
+          else [ pkgs.grub2 pkgs.syslinux ]);
+    system.boot.loader.kernelFile = pkgs.stdenv.platform.kernelTarget;
 
     fileSystems."/" =
       { fsType = "tmpfs";
@@ -84,7 +84,12 @@ with lib;
         ];
     };
 
-    system.build.netbootIpxeScript = pkgs.writeTextDir "netboot.ipxe" "#!ipxe\nkernel bzImage init=${config.system.build.toplevel}/init ${toString config.boot.kernelParams}\ninitrd initrd\nboot";
+    system.build.netbootIpxeScript = pkgs.writeTextDir "netboot.ipxe" ''
+      #!ipxe
+      kernel ${pkgs.stdenv.platform.kernelTarget} init=${config.system.build.toplevel}/init ${toString config.boot.kernelParams}
+      initrd initrd
+      boot
+    '';
 
     boot.loader.timeout = 10;