[Desktop+General] Add debug config flag in order to have more verbose boots

(for instance)

Signed-off-by: Antoine Viallon <antoine@lesviallon.fr>
This commit is contained in:
Antoine Viallon 2022-03-25 02:47:00 +01:00
parent 67a7159f86
commit 21747d37a7
Signed by: aviallon
GPG key ID: 186FC35EDEB25716
2 changed files with 8 additions and 3 deletions

View file

@ -2,6 +2,7 @@
with lib;
let
cfg = config.aviallon.desktop;
generalCfg = config.aviallon.general;
filterConfig = pkgs.writeText "pipewire-noise-filter.cfg" ''
# Noise canceling source
#
@ -136,9 +137,12 @@ in {
};
boot.plymouth.enable = mkDefault true;
boot.kernelParams = [ "splash" "udev.log_level=3" ];
boot.initrd.verbose = false;
# boot.consoleLogLevel = 1;
boot.kernelParams = concatLists [
(optionals (!generalCfg.debug) [ "splash" "udev.log_level=3" ])
["preempt=full"]
];
boot.initrd.verbose = generalCfg.debug;
boot.consoleLogLevel = mkIf (!generalCfg.debug) 1;
# Enable sound.
sound.enable = false;

View file

@ -43,6 +43,7 @@ in
};
unsafeOptimizations = mkEnableOption "unsafe system tuning";
flakes.enable = mkEnableOption "experimental flake support";
debug = mkEnableOption "debug-specific configuration";
};
config = mkIf cfg.enable {