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

View file

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