{ config, lib, ... }: { options.szpont.bootloader = lib.mkOption { type = lib.types.enum [ "systemd-boot" "grub" "none" ]; description = "which bootloader to use"; }; config = lib.mkMerge [ { boot.loader.efi.canTouchEfiVariables = true; boot.supportedFilesystems = [ "ntfs" ]; } (lib.mkIf (config.szpont.bootloader == "systemd-boot") { boot = { kernelParams = [ "quiet" ]; loader = { systemd-boot = { enable = true; editor = false; }; timeout = 0; }; }; }) (lib.mkIf (config.szpont.bootloader == "grub") { boot.loader.grub = { enable = true; device = "nodev"; efiSupport = true; }; }) ]; }