Use systemd-boot instead of gummiboot

Gummiboot is part of systemd now so we may as well use it.

+10 -12
+2 -5
nixos/modules/system/boot/loader/efi.nix
··· 4 5 { 6 options.boot.loader.efi = { 7 canTouchEfiVariables = mkOption { 8 default = false; 9 - 10 type = types.bool; 11 - 12 - description = "Whether or not the installation process should modify efi boot variables."; 13 }; 14 15 efiSysMountPoint = mkOption { 16 default = "/boot"; 17 - 18 type = types.str; 19 - 20 description = "Where the EFI System Partition is mounted."; 21 }; 22 };
··· 4 5 { 6 options.boot.loader.efi = { 7 + 8 canTouchEfiVariables = mkOption { 9 default = false; 10 type = types.bool; 11 + description = "Whether the installation process is allowed to modify EFI boot variables."; 12 }; 13 14 efiSysMountPoint = mkOption { 15 default = "/boot"; 16 type = types.str; 17 description = "Where the EFI System Partition is mounted."; 18 }; 19 };
+1 -1
nixos/modules/system/boot/loader/grub/grub.nix
··· 488 } 489 { 490 assertion = if args.efiSysMountPoint == null then true else hasPrefix "/" args.efiSysMountPoint; 491 - message = "Efi paths must be absolute, not ${args.efiSysMountPoint}"; 492 } 493 ] ++ flip map args.devices (device: { 494 assertion = device == "nodev" || hasPrefix "/" device;
··· 488 } 489 { 490 assertion = if args.efiSysMountPoint == null then true else hasPrefix "/" args.efiSysMountPoint; 491 + message = "EFI paths must be absolute, not ${args.efiSysMountPoint}"; 492 } 493 ] ++ flip map args.devices (device: { 494 assertion = device == "nodev" || hasPrefix "/" device;
+3 -3
nixos/modules/system/boot/loader/gummiboot/gummiboot-builder.py
··· 88 if not path in known_paths: 89 os.unlink(path) 90 91 - parser = argparse.ArgumentParser(description='Update NixOS-related gummiboot files') 92 parser.add_argument('default_config', metavar='DEFAULT-CONFIG', help='The default NixOS config to boot') 93 args = parser.parse_args() 94 95 # We deserve our own env var! 96 if os.getenv("NIXOS_INSTALL_GRUB") == "1": 97 if "@canTouchEfiVariables@" == "1": 98 - subprocess.check_call(["@gummiboot@/bin/gummiboot", "--path=@efiSysMountPoint@", "install"]) 99 else: 100 - subprocess.check_call(["@gummiboot@/bin/gummiboot", "--path=@efiSysMountPoint@", "--no-variables", "install"]) 101 102 mkdir_p("@efiSysMountPoint@/efi/nixos") 103 mkdir_p("@efiSysMountPoint@/loader/entries")
··· 88 if not path in known_paths: 89 os.unlink(path) 90 91 + parser = argparse.ArgumentParser(description='Update NixOS-related systemd-boot files') 92 parser.add_argument('default_config', metavar='DEFAULT-CONFIG', help='The default NixOS config to boot') 93 args = parser.parse_args() 94 95 # We deserve our own env var! 96 if os.getenv("NIXOS_INSTALL_GRUB") == "1": 97 if "@canTouchEfiVariables@" == "1": 98 + subprocess.check_call(["@systemd@/bin/bootctl", "--path=@efiSysMountPoint@", "install"]) 99 else: 100 + subprocess.check_call(["@systemd@/bin/bootctl", "--path=@efiSysMountPoint@", "--no-variables", "install"]) 101 102 mkdir_p("@efiSysMountPoint@/efi/nixos") 103 mkdir_p("@efiSysMountPoint@/loader/entries")
+4 -2
nixos/modules/system/boot/loader/gummiboot/gummiboot.nix
··· 12 13 isExecutable = true; 14 15 - inherit (pkgs) python gummiboot; 16 17 nix = config.nix.package.out; 18 ··· 27 28 type = types.bool; 29 30 - description = "Whether to enable the gummiboot UEFI boot manager"; 31 }; 32 }; 33
··· 12 13 isExecutable = true; 14 15 + inherit (pkgs) python; 16 + 17 + systemd = config.systemd.package; 18 19 nix = config.nix.package.out; 20 ··· 29 30 type = types.bool; 31 32 + description = "Whether to enable the systemd-boot (formerly gummiboot) EFI boot manager"; 33 }; 34 }; 35
-1
nixos/tests/installer.nix
··· 208 pkgs.unionfs-fuse 209 pkgs.ntp 210 pkgs.nixos-artwork 211 - pkgs.gummiboot 212 pkgs.perlPackages.XMLLibXML 213 pkgs.perlPackages.ListCompare 214 ]
··· 208 pkgs.unionfs-fuse 209 pkgs.ntp 210 pkgs.nixos-artwork 211 pkgs.perlPackages.XMLLibXML 212 pkgs.perlPackages.ListCompare 213 ]