diff options
author | Graham Christensen <graham@grahamc.com> | 2017-04-14 17:59:54 -0400 |
---|---|---|
committer | Graham Christensen <graham@grahamc.com> | 2017-12-11 21:33:55 -0500 |
commit | 08b8bc24cb818d78971f6cb941b7991e54c6971b (patch) | |
tree | 91586162cc1db352b3d2c8d808203ca7afe7d6e6 /nixos/modules/installer | |
parent | 76090f5dc39843bc1d03d64b97436e7333ff90dd (diff) | |
download | nixlib-08b8bc24cb818d78971f6cb941b7991e54c6971b.tar nixlib-08b8bc24cb818d78971f6cb941b7991e54c6971b.tar.gz nixlib-08b8bc24cb818d78971f6cb941b7991e54c6971b.tar.bz2 nixlib-08b8bc24cb818d78971f6cb941b7991e54c6971b.tar.lz nixlib-08b8bc24cb818d78971f6cb941b7991e54c6971b.tar.xz nixlib-08b8bc24cb818d78971f6cb941b7991e54c6971b.tar.zst nixlib-08b8bc24cb818d78971f6cb941b7991e54c6971b.zip |
Netboot: Add aarch64
Diffstat (limited to 'nixos/modules/installer')
-rw-r--r-- | nixos/modules/installer/netboot/netboot.nix | 19 |
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; |