diff options
Diffstat (limited to 'sys/boot')
| -rw-r--r-- | sys/boot/efi.nix | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/sys/boot/efi.nix b/sys/boot/efi.nix index 35cf687..cbcefd9 100644 --- a/sys/boot/efi.nix +++ b/sys/boot/efi.nix @@ -6,8 +6,15 @@ in options.local.boot.efi = { enable = mkEnableOption "EFI with FAT32 system partition"; - esp.uuid = mkOption { - type = types.strMatching "[0-9A-F]{4}-[0-9A-F]{4}"; + esp = { + mountpoint = mkOption { + type = types.enum [ "/boot" "/boot/efi" ]; + default = "/boot"; + }; + + uuid = mkOption { + type = types.strMatching "[0-9A-F]{4}-[0-9A-F]{4}"; + }; }; removable = mkOption { @@ -20,12 +27,16 @@ in initrd.supportedFilesystems = [ "vfat" ]; loader = { - efi.canTouchEfiVariables = !cfg.removable; + efi = { + efiSysMountPoint = cfg.esp.mountpoint; + canTouchEfiVariables = !cfg.removable; + }; + grub.efiInstallAsRemovable = cfg.removable; }; }; - fileSystems."/boot" = { + fileSystems.${cfg.esp.mountpoint} = { device = "/dev/disk/by-uuid/${cfg.esp.uuid}"; fsType = "vfat"; options = [ "noatime" "umask=027" "sync" ]; |
