{ lib, config, ... }: let cfg = config.cyclamen.system.boot.loader; in { options.cyclamen.system.boot.loader = lib.mkOption { type = lib.types.enum [ "systemd-boot" ]; default = "systemd-boot"; description = "The bootloader to be used on this system."; }; config = lib.mkMerge [ { boot.loader.efi.canTouchEfiVariables = true; } (lib.mkIf (cfg == "systemd-boot") { boot.loader.systemd-boot = { enable = true; # See option description editor = false; }; }) ]; }