Use silent boot if plymouth is enabled

This commit is contained in:
ItsDrike 2024-04-13 00:07:53 +02:00
parent 97680bd24e
commit ac39d93be3
Signed by: ItsDrike
GPG key ID: FA2745890B7048C0
2 changed files with 23 additions and 2 deletions

View file

@ -23,5 +23,10 @@ in {
This option defaults to `true` if the host provides patches to the kernel package in This option defaults to `true` if the host provides patches to the kernel package in
`boot.kernelPatches` `boot.kernelPatches`
''; '';
silentBoot = mkEnableOption ''
almost entirely silent boot process through `quiet` kernel parameter
''
// { default = cfg.plymouth.enable; };
}; };
} }

View file

@ -1,9 +1,9 @@
{ config, lib, ... }: let { config, lib, ... }: let
inherit (lib) mkDefault; inherit (lib) mkDefault optionals;
cfg = config.myOptions.system.boot; cfg = config.myOptions.system.boot;
in { in {
config.boot = { boot = {
# kernel console loglevel # kernel console loglevel
consoleLogLevel = 3; consoleLogLevel = 3;
@ -38,5 +38,21 @@ in {
# but should be tweaked based on your systems capabilities # but should be tweaked based on your systems capabilities
tmpfsSize = mkDefault "50%"; tmpfsSize = mkDefault "50%";
}; };
kernelParams = (optionals cfg.silentBoot [
# tell the kernel to not be verbose
"quiet"
"loglevel=3" # 1: system is unusable | 3: error condition | 7: very verbose
# udev log message level
# rd prefix means systemd-udev will be used instead of initrd
"udev.log_level=3"
"rd.udev.log_level=3"
# disable systemd status messages
"systemd.show_status=auto"
"rd.systemd.show_status=auto"
]);
}; };
} }