diff options
| author | Silas Schöffel <sils@sils.li> | 2024-12-17 23:15:43 +0100 |
|---|---|---|
| committer | Silas Schöffel <sils@sils.li> | 2024-12-17 23:15:43 +0100 |
| commit | f7c6e04de69590a50211505107c9a5d0f7815e45 (patch) | |
| tree | 56d1d593283ee216a121e1d5ce2c3a5e506cebe5 /modules/nixos/sils/bootloader.nix | |
| parent | flake.lock: update (diff) | |
| download | nix-config-f7c6e04de69590a50211505107c9a5d0f7815e45.zip | |
make bootloader configurable
Diffstat (limited to 'modules/nixos/sils/bootloader.nix')
| -rw-r--r-- | modules/nixos/sils/bootloader.nix | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/modules/nixos/sils/bootloader.nix b/modules/nixos/sils/bootloader.nix new file mode 100644 index 0000000..fc0e0f3 --- /dev/null +++ b/modules/nixos/sils/bootloader.nix @@ -0,0 +1,30 @@ +{ + config, + lib, + ... +}: let + btl = config.sils.bootloader; +in { + options.sils.bootloader = lib.mkOption { + type = lib.types.enum ["lanzaboote" "grub"]; + default = "lanzaboote"; + description = "Which bootloader to use."; + }; + config.boot = + if btl == "lanzaboote" + then { + lanzaboote = { + enable = true; + configurationLimit = 10; + pkiBundle = "/etc/secureboot"; + settings = { + editor = false; + }; + }; + } + else if btl == "grub" + then { + loader.grub.enable = true; + } + else {}; +} |
