Skip to content

Commit

Permalink
nixos/xserver,gdm: let GDM handle X server verbosity.
Browse files Browse the repository at this point in the history
  • Loading branch information
roastiek authored and fpletz committed Sep 27, 2017
1 parent 4ef8233 commit 0cad98d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions nixos/modules/services/x11/display-managers/gdm.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
{
Expand Down
12 changes: 11 additions & 1 deletion nixos/modules/services/x11/xserver.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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}"
Expand Down

0 comments on commit 0cad98d

Please sign in to comment.