add grub/systemd to common top level

This commit is contained in:
RingOfStorms (Joshua Bell) 2025-03-07 17:34:08 -06:00
parent 1876bc1029
commit 7841a8c062
4 changed files with 125 additions and 84 deletions

28
common/boot/systemd.nix Normal file
View file

@ -0,0 +1,28 @@
{
custom_config_key,
config,
lib,
...
}:
let
cfg_path = "${custom_config_key}".boot.systemd;
cfg = config.${cfg_path};
in
with lib;
{
options.${cfg_path} = {
enable = mkEnableOption "Systemd bootloader";
};
config = mkIf cfg.enable {
boot.loader = {
systemd-boot = {
enable = true;
consoleMode = "keep";
};
timeout = 5;
efi = {
canTouchEfiVariables = true;
};
};
};
}