1{ lib, config, ... }: let
2 cfg = config.cyclamen.system.boot.loader;
3in {
4 options.cyclamen.system.boot.loader = lib.mkOption {
5 type = lib.types.enum [
6 "systemd-boot"
7 ];
8 default = "systemd-boot";
9 description = "The bootloader to be used on this system.";
10 };
11
12 config = lib.mkMerge [
13 {
14 boot.loader.efi.canTouchEfiVariables = true;
15 }
16
17 (lib.mkIf (cfg == "systemd-boot") {
18 boot.loader.systemd-boot = {
19 enable = true;
20
21 # See option description
22 editor = false;
23 };
24 })
25 ];
26}