diff options
Diffstat (limited to 'modules/nixos/bootloader.nix')
-rw-r--r-- | modules/nixos/bootloader.nix | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/modules/nixos/bootloader.nix b/modules/nixos/bootloader.nix deleted file mode 100644 index bb807cf..0000000 --- a/modules/nixos/bootloader.nix +++ /dev/null @@ -1,48 +0,0 @@ -{ lib, config, ... }: let - cfg = config.boot._loader; - usingEfi = cfg.mode == "efi"; - usingBios = cfg.mode == "bios"; -in { - options.boot._loader = { - enable = lib.mkEnableOption "enable unified bootloader config"; - loader = lib.mkOption { - type = lib.types.enum [ "grub" "systemd-boot" ]; - default = "systemd-boot"; - description = "whether to install grub or systemd-boot as the bootloader"; - }; - mode = lib.mkOption { - type = lib.types.enum [ "efi" "bios" ]; - default = "efi"; - description = "whether to install the bootloader in efi or bios mode"; - }; - grub = { - biosDevice = lib.mkOption { - type = lib.types.str; - description = "device to install grub on"; - }; - }; - memtest86.enable = lib.mkEnableOption "make Memtest86+ available from the bootloader"; - }; - - config = lib.mkIf cfg.enable { - boot.loader = { - grub = lib.mkIf (cfg.loader == "grub") { - enable = true; - efiSupport = usingEfi; - efiInstallAsRemovable = usingEfi; - device = if usingBios then cfg.grub.biosDevice else "nodev"; - enableCryptodisk = true; - memtest86.enable = cfg.memtest86.enable; - }; - systemd-boot = lib.mkIf (cfg.loader == "systemd-boot") { - enable = true; - editor = false; - memtest86.enable = cfg.memtest86.enable; - }; - efi = lib.mkIf usingEfi { - efiSysMountPoint = lib.mkIf (cfg.loader == "grub") "/boot/efi"; - canTouchEfiVariables = true; - }; - }; - }; -} |