dotfiles/common/boot/systemd.nix
RingOfStorms (Joshua Bell) 7e7f04574b WIP refactor
2025-03-16 23:25:18 -05:00

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;
};
};
};
}