optional fancy boot

This commit is contained in:
notgne2 2023-04-08 15:37:31 -07:00
parent addeecc8c6
commit dad156a849
Signed by: notgne2
SSH Key Fingerprint: SHA256:qlFCAimT/PvNIG3u+aYT9pIqFCWgu6sNsWjpV1vHLIE

View File

@ -20,6 +20,12 @@ in {
default = false; default = false;
description = "If this device has a battery"; description = "If this device has a battery";
}; };
fancyBoot = mkOption {
type = types.bool;
default = true;
description = "If to use a prettier booting process";
};
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
@ -31,10 +37,10 @@ in {
}; };
boot = { boot = {
consoleLogLevel = lib.mkDefault 0; consoleLogLevel = lib.mkDefault cfg.fancyBoot;
initrd.verbose = lib.mkDefault false; initrd.verbose = lib.mkDefault (!cfg.fancyBoot);
plymouth.enable = lib.mkDefault true; plymouth.enable = lib.mkDefault cfg.fancyBoot;
kernelParams = [ kernelParams = lib.mkIf cfg.fancyBoot [
"quiet" "quiet"
"loglevel=3" "loglevel=3"
"rd.systemd.show_status=no" "rd.systemd.show_status=no"
@ -43,7 +49,7 @@ in {
"vt.global_cursor_default=0" "vt.global_cursor_default=0"
]; ];
loader.timeout = 0; loader.timeout = lib.mkIf cfg.fancyBoot 0;
kernel.sysctl = { kernel.sysctl = {
# lol anti-cheat # lol anti-cheat