summary refs log tree commit diff
path: root/nixos/modules/system
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2016-05-31 16:52:40 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2016-05-31 17:02:47 +0200
commitf222689aba0b0f5c7c06c77406d33538d9f40cb9 (patch)
tree659e72588226967c81ec696a0cbb3d6b517e7bb5 /nixos/modules/system
parent66d5ca6f420a07e90290a0e1c54817e6499e745c (diff)
downloadnixlib-f222689aba0b0f5c7c06c77406d33538d9f40cb9.tar
nixlib-f222689aba0b0f5c7c06c77406d33538d9f40cb9.tar.gz
nixlib-f222689aba0b0f5c7c06c77406d33538d9f40cb9.tar.bz2
nixlib-f222689aba0b0f5c7c06c77406d33538d9f40cb9.tar.lz
nixlib-f222689aba0b0f5c7c06c77406d33538d9f40cb9.tar.xz
nixlib-f222689aba0b0f5c7c06c77406d33538d9f40cb9.tar.zst
nixlib-f222689aba0b0f5c7c06c77406d33538d9f40cb9.zip
Use systemd-boot instead of gummiboot
Gummiboot is part of systemd now so we may as well use it.
Diffstat (limited to 'nixos/modules/system')
-rw-r--r--nixos/modules/system/boot/loader/efi.nix7
-rw-r--r--nixos/modules/system/boot/loader/grub/grub.nix2
-rw-r--r--nixos/modules/system/boot/loader/gummiboot/gummiboot-builder.py6
-rw-r--r--nixos/modules/system/boot/loader/gummiboot/gummiboot.nix6
4 files changed, 10 insertions, 11 deletions
diff --git a/nixos/modules/system/boot/loader/efi.nix b/nixos/modules/system/boot/loader/efi.nix
index 726634e664d7..6043c904c450 100644
--- a/nixos/modules/system/boot/loader/efi.nix
+++ b/nixos/modules/system/boot/loader/efi.nix
@@ -4,19 +4,16 @@ with lib;
 
 {
   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.";
     };
   };
diff --git a/nixos/modules/system/boot/loader/grub/grub.nix b/nixos/modules/system/boot/loader/grub/grub.nix
index 2e06a684f0cc..0640ec306e18 100644
--- a/nixos/modules/system/boot/loader/grub/grub.nix
+++ b/nixos/modules/system/boot/loader/grub/grub.nix
@@ -488,7 +488,7 @@ in
         }
         {
           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;
diff --git a/nixos/modules/system/boot/loader/gummiboot/gummiboot-builder.py b/nixos/modules/system/boot/loader/gummiboot/gummiboot-builder.py
index ef431a7732e1..c38af1b67f17 100644
--- a/nixos/modules/system/boot/loader/gummiboot/gummiboot-builder.py
+++ b/nixos/modules/system/boot/loader/gummiboot/gummiboot-builder.py
@@ -88,16 +88,16 @@ def remove_old_entries(gens):
         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")
diff --git a/nixos/modules/system/boot/loader/gummiboot/gummiboot.nix b/nixos/modules/system/boot/loader/gummiboot/gummiboot.nix
index aec697da4a1a..2225df348762 100644
--- a/nixos/modules/system/boot/loader/gummiboot/gummiboot.nix
+++ b/nixos/modules/system/boot/loader/gummiboot/gummiboot.nix
@@ -12,7 +12,9 @@ let
 
     isExecutable = true;
 
-    inherit (pkgs) python gummiboot;
+    inherit (pkgs) python;
+
+    systemd = config.systemd.package;
 
     nix = config.nix.package.out;
 
@@ -27,7 +29,7 @@ in {
 
       type = types.bool;
 
-      description = "Whether to enable the gummiboot UEFI boot manager";
+      description = "Whether to enable the systemd-boot (formerly gummiboot) EFI boot manager";
     };
   };