diff options
| author | adikro <adikro@disroot.org> | 2025-12-18 21:04:00 +0100 |
|---|---|---|
| committer | adikro <adikro@disroot.org> | 2025-12-18 21:04:00 +0100 |
| commit | e60410393cea222b16743a1a87f29c06b9b3543b (patch) | |
| tree | 8a574048613f6b13024795bd710b824b40f5db18 /modules/sys/core/bootloader.nix | |
| parent | ea3bf9c87ee72d6da5ea2316b229082c7fc9cdf6 (diff) | |
rewrite of system modules, hm modules are next
Diffstat (limited to 'modules/sys/core/bootloader.nix')
| -rw-r--r-- | modules/sys/core/bootloader.nix | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/modules/sys/core/bootloader.nix b/modules/sys/core/bootloader.nix new file mode 100644 index 0000000..dabea20 --- /dev/null +++ b/modules/sys/core/bootloader.nix @@ -0,0 +1,36 @@ +{ 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; + }; + }) + ]; +} |
