diff --git a/nixos/modules/services/x11/display-managers/gdm.nix b/nixos/modules/services/x11/display-managers/gdm.nix index e68bc816aad2..83c5c95dae7e 100644 --- a/nixos/modules/services/x11/display-managers/gdm.nix +++ b/nixos/modules/services/x11/display-managers/gdm.nix @@ -102,6 +102,7 @@ in # GDM needs different xserverArgs, presumable because using wayland by default. services.xserver.tty = null; services.xserver.display = null; + services.xserver.verbose = null; services.xserver.displayManager.job = { diff --git a/nixos/modules/services/x11/xserver.nix b/nixos/modules/services/x11/xserver.nix index 3ce124d3da27..d4fe475690ce 100644 --- a/nixos/modules/services/x11/xserver.nix +++ b/nixos/modules/services/x11/xserver.nix @@ -480,6 +480,15 @@ in ''; }; + verbose = mkOption { + type = types.nullOr types.int; + default = 3; + example = 7; + description = '' + Controls verbosity of X logging. + ''; + }; + useGlamor = mkOption { type = types.bool; default = false; @@ -631,10 +640,11 @@ in [ "-config ${configFile}" "-xkbdir" "${cfg.xkbDir}" # Log at the default verbosity level to stderr rather than /var/log/X.*.log. - "-verbose" "3" "-logfile" "/dev/null" + "-logfile" "/dev/null" ] ++ optional (cfg.display != null) ":${toString cfg.display}" ++ optional (cfg.tty != null) "vt${toString cfg.tty}" ++ optional (cfg.dpi != null) "-dpi ${toString cfg.dpi}" + ++ optional (cfg.verbose != null) "-verbose ${toString cfg.verbose}" ++ optional (!cfg.enableTCP) "-nolisten tcp" ++ optional (cfg.autoRepeatDelay != null) "-ardelay ${toString cfg.autoRepeatDelay}" ++ optional (cfg.autoRepeatInterval != null) "-arinterval ${toString cfg.autoRepeatInterval}"