Use systemd-boot instead of gummiboot

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

Changed files
+10 -12
nixos
modules
system
boot
tests
+2 -5
nixos/modules/system/boot/loader/efi.nix
···
{
options.boot.loader.efi = {
+
canTouchEfiVariables = mkOption {
default = false;
-
type = types.bool;
-
-
description = "Whether or not the installation process should modify efi boot variables.";
+
description = "Whether the installation process is allowed to modify EFI boot variables.";
};
efiSysMountPoint = mkOption {
default = "/boot";
-
type = types.str;
-
description = "Where the EFI System Partition is mounted.";
};
};
+1 -1
nixos/modules/system/boot/loader/grub/grub.nix
···
}
{
assertion = if args.efiSysMountPoint == null then true else hasPrefix "/" args.efiSysMountPoint;
-
message = "Efi paths must be absolute, not ${args.efiSysMountPoint}";
+
message = "EFI paths must be absolute, not ${args.efiSysMountPoint}";
}
] ++ flip map args.devices (device: {
assertion = device == "nodev" || hasPrefix "/" device;
+3 -3
nixos/modules/system/boot/loader/gummiboot/gummiboot-builder.py
···
if not path in known_paths:
os.unlink(path)
-
parser = argparse.ArgumentParser(description='Update NixOS-related gummiboot files')
+
parser = argparse.ArgumentParser(description='Update NixOS-related systemd-boot files')
parser.add_argument('default_config', metavar='DEFAULT-CONFIG', help='The default NixOS config to boot')
args = parser.parse_args()
# We deserve our own env var!
if os.getenv("NIXOS_INSTALL_GRUB") == "1":
if "@canTouchEfiVariables@" == "1":
-
subprocess.check_call(["@gummiboot@/bin/gummiboot", "--path=@efiSysMountPoint@", "install"])
+
subprocess.check_call(["@systemd@/bin/bootctl", "--path=@efiSysMountPoint@", "install"])
else:
-
subprocess.check_call(["@gummiboot@/bin/gummiboot", "--path=@efiSysMountPoint@", "--no-variables", "install"])
+
subprocess.check_call(["@systemd@/bin/bootctl", "--path=@efiSysMountPoint@", "--no-variables", "install"])
mkdir_p("@efiSysMountPoint@/efi/nixos")
mkdir_p("@efiSysMountPoint@/loader/entries")
+4 -2
nixos/modules/system/boot/loader/gummiboot/gummiboot.nix
···
isExecutable = true;
-
inherit (pkgs) python gummiboot;
+
inherit (pkgs) python;
+
+
systemd = config.systemd.package;
nix = config.nix.package.out;
···
type = types.bool;
-
description = "Whether to enable the gummiboot UEFI boot manager";
+
description = "Whether to enable the systemd-boot (formerly gummiboot) EFI boot manager";
};
};
-1
nixos/tests/installer.nix
···
pkgs.unionfs-fuse
pkgs.ntp
pkgs.nixos-artwork
-
pkgs.gummiboot
pkgs.perlPackages.XMLLibXML
pkgs.perlPackages.ListCompare
]