diff options
| author | Alejandro Soto <alejandro@34project.org> | 2024-12-03 17:30:42 -0600 |
|---|---|---|
| committer | Alejandro Soto <alejandro@34project.org> | 2024-12-03 23:10:42 -0600 |
| commit | 771624767c3d916e2c77d352e71c07bffca8da59 (patch) | |
| tree | 6e7808948a7f9416a8880d07ae7e32f02aeecf37 /sys/boot/efi.nix | |
| parent | cadbe2cdcc16836cda8f936e3c61c28d3ba2cba5 (diff) | |
sys/platform/[lustrated]: initial commit, adapted from old [lustrated] repo
Diffstat (limited to '')
| -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" ]; |
