git.iko.soy/typeable/nixpkgs
on master help sign in
Use systemd-boot instead of gummiboot

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

commitf222689aba0b0f5c7c06c77406d33538d9f40cb9 authorEelco Dolstra <eelco.dolstra@logicblox.com> dateTue 31 May 2016, 16:52 (11 years ago) parent66d5ca6
5 files changed+10−12
nixos/modules/system/boot/loader/efi.nix+2−5 nixos/modules/system/boot/loader/grub/grub.nix+1−1 nixos/modules/system/boot/loader/gummiboot/gummiboot-builder.py+3−3 nixos/modules/system/boot/loader/gummiboot/gummiboot.nix+4−2 nixos/tests/installer.nix−1
nixos/modules/system/boot/loader/efi.nix+2−5
@@ -4,19 +4,16 @@ with lib;
44
55{
66 options.boot.loader.efi = {
7+
78 canTouchEfiVariables = mkOption {
89 default = false;
9−
1010 type = types.bool;
11−
12− description = "Whether or not the installation process should modify efi boot variables.";
11+ description = "Whether the installation process is allowed to modify EFI boot variables.";
1312 };
1413
1514 efiSysMountPoint = mkOption {
1615 default = "/boot";
17−
1816 type = types.str;
19−
2017 description = "Where the EFI System Partition is mounted.";
2118 };
2219 };
nixos/modules/system/boot/loader/grub/grub.nix+1−1
@@ -488,7 +488,7 @@ in
488488 }
489489 {
490490 assertion = if args.efiSysMountPoint == null then true else hasPrefix "/" args.efiSysMountPoint;
491− message = "Efi paths must be absolute, not ${args.efiSysMountPoint}";
491+ message = "EFI paths must be absolute, not ${args.efiSysMountPoint}";
492492 }
493493 ] ++ flip map args.devices (device: {
494494 assertion = device == "nodev" || hasPrefix "/" device;
nixos/modules/system/boot/loader/gummiboot/gummiboot-builder.py+3−3
@@ -88,16 +88,16 @@ def remove_old_entries(gens):
8888 if not path in known_paths:
8989 os.unlink(path)
9090
91−parser = argparse.ArgumentParser(description='Update NixOS-related gummiboot files')
91+parser = argparse.ArgumentParser(description='Update NixOS-related systemd-boot files')
9292parser.add_argument('default_config', metavar='DEFAULT-CONFIG', help='The default NixOS config to boot')
9393args = parser.parse_args()
9494
9595# We deserve our own env var!
9696if os.getenv("NIXOS_INSTALL_GRUB") == "1":
9797 if "@canTouchEfiVariables@" == "1":
98− subprocess.check_call(["@gummiboot@/bin/gummiboot", "--path=@efiSysMountPoint@", "install"])
98+ subprocess.check_call(["@systemd@/bin/bootctl", "--path=@efiSysMountPoint@", "install"])
9999 else:
100− subprocess.check_call(["@gummiboot@/bin/gummiboot", "--path=@efiSysMountPoint@", "--no-variables", "install"])
100+ subprocess.check_call(["@systemd@/bin/bootctl", "--path=@efiSysMountPoint@", "--no-variables", "install"])
101101
102102mkdir_p("@efiSysMountPoint@/efi/nixos")
103103mkdir_p("@efiSysMountPoint@/loader/entries")
nixos/modules/system/boot/loader/gummiboot/gummiboot.nix+4−2
@@ -12,7 +12,9 @@ let
1212
1313 isExecutable = true;
1414
15− inherit (pkgs) python gummiboot;
15+ inherit (pkgs) python;
16+
17+ systemd = config.systemd.package;
1618
1719 nix = config.nix.package.out;
1820
@@ -27,7 +29,7 @@ in {
2729
2830 type = types.bool;
2931
30− description = "Whether to enable the gummiboot UEFI boot manager";
32+ description = "Whether to enable the systemd-boot (formerly gummiboot) EFI boot manager";
3133 };
3234 };
3335
nixos/tests/installer.nix−1
@@ -208,7 +208,6 @@ let
208208 pkgs.unionfs-fuse
209209 pkgs.ntp
210210 pkgs.nixos-artwork
211− pkgs.gummiboot
212211 pkgs.perlPackages.XMLLibXML
213212 pkgs.perlPackages.ListCompare
214213 ]