33 lines
553 B
Nix
33 lines
553 B
Nix
{
|
|
config,
|
|
lib,
|
|
...
|
|
}:
|
|
let
|
|
ccfg = import ../config.nix;
|
|
cfg_path = [
|
|
ccfg.custom_config_key
|
|
"boot"
|
|
"systemd"
|
|
];
|
|
cfg = lib.attrsets.getAttrFromPath cfg_path config;
|
|
in
|
|
{
|
|
options =
|
|
{ }
|
|
// lib.attrsets.setAttrByPath cfg_path {
|
|
enable = lib.mkEnableOption "Systemd bootloader";
|
|
};
|
|
config = lib.mkIf cfg.enable {
|
|
boot.loader = {
|
|
systemd-boot = {
|
|
enable = true;
|
|
consoleMode = "keep";
|
|
};
|
|
timeout = 5;
|
|
efi = {
|
|
canTouchEfiVariables = true;
|
|
};
|
|
};
|
|
};
|
|
}
|