add grub/systemd to common top level
This commit is contained in:
parent
1876bc1029
commit
7841a8c062
4 changed files with 125 additions and 84 deletions
28
common/boot/systemd.nix
Normal file
28
common/boot/systemd.nix
Normal 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;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue