Extract bootloader and silent boot configs into separate files

This commit is contained in:
SebastianStork 2024-07-19 12:21:24 +02:00
parent 9428e46545
commit e551976a8a
3 changed files with 37 additions and 38 deletions

View file

@ -1,38 +0,0 @@
{ config, lib, ... }:
{
options.myConfig.boot = {
loader.systemd-boot.enable = lib.mkEnableOption "";
silent = lib.mkEnableOption "";
};
config = lib.mkMerge [
(lib.mkIf config.myConfig.boot.loader.systemd-boot.enable {
boot.tmp.cleanOnBoot = true;
boot.loader = {
systemd-boot = {
enable = true;
editor = false;
configurationLimit = 20;
};
efi.canTouchEfiVariables = true;
timeout = 0;
};
systemd.watchdog.rebootTime = "10";
})
(lib.mkIf config.myConfig.boot.silent {
boot = {
kernelParams = [
"quiet"
"rd.systemd.show_status=false"
"rd.udev.log_level=3"
"udev.log_priority=3"
];
consoleLogLevel = 3;
initrd.verbose = false;
initrd.systemd.enable = true;
plymouth.enable = true;
};
})
];
}

View file

@ -0,0 +1,18 @@
{ config, lib, ... }:
{
options.myConfig.boot.loader.systemd-boot.enable = lib.mkEnableOption "";
config = lib.mkIf config.myConfig.boot.loader.systemd-boot.enable {
boot.tmp.cleanOnBoot = true;
boot.loader = {
systemd-boot = {
enable = true;
editor = false;
configurationLimit = 20;
};
efi.canTouchEfiVariables = true;
timeout = 0;
};
systemd.watchdog.rebootTime = "10";
};
}

View file

@ -0,0 +1,19 @@
{ config, lib, ... }:
{
options.myConfig.boot.silent = lib.mkEnableOption "";
config = lib.mkIf config.myConfig.boot.silent {
boot = {
kernelParams = [
"quiet"
"rd.systemd.show_status=false"
"rd.udev.log_level=3"
"udev.log_priority=3"
];
consoleLogLevel = 3;
initrd.verbose = false;
initrd.systemd.enable = true;
plymouth.enable = true;
};
};
}