diff --git a/nixos/modules/services/x11/display-managers/default.nix b/nixos/modules/services/x11/display-managers/default.nix index c8a1a2361f7f..c0daf30d04eb 100644 --- a/nixos/modules/services/x11/display-managers/default.nix +++ b/nixos/modules/services/x11/display-managers/default.nix @@ -187,7 +187,6 @@ in default = []; example = [ "-ac" "-logverbose" "-verbose" "-nolisten tcp" ]; description = "List of arguments for the X server."; - apply = toString; }; sessionCommands = mkOption { diff --git a/nixos/modules/services/x11/display-managers/gdm.nix b/nixos/modules/services/x11/display-managers/gdm.nix index d3aa63fd4284..6c63fede857f 100644 --- a/nixos/modules/services/x11/display-managers/gdm.nix +++ b/nixos/modules/services/x11/display-managers/gdm.nix @@ -92,10 +92,15 @@ in users.extraGroups.gdm.gid = config.ids.gids.gdm; + # GDM needs different xserverArgs, presumable because using wayland by default. + services.xserver.tty = null; + services.xserver.display = null; + services.xserver.displayManager.job = { environment = { - GDM_X_SERVER_EXTRA_ARGS = "${cfg.xserverArgs}"; + GDM_X_SERVER_EXTRA_ARGS = toString + (filter (arg: arg != "-terminate") cfg.xserverArgs); GDM_SESSIONS_DIR = "${cfg.session.desktops}"; # Find the mouse XCURSOR_PATH = "~/.icons:${config.system.path}/share/icons"; diff --git a/nixos/modules/services/x11/display-managers/kdm.nix b/nixos/modules/services/x11/display-managers/kdm.nix index 8b51c621e112..04701a1640cc 100644 --- a/nixos/modules/services/x11/display-managers/kdm.nix +++ b/nixos/modules/services/x11/display-managers/kdm.nix @@ -25,7 +25,7 @@ let FailsafeClient=${pkgs.xterm}/bin/xterm [X-:*-Core] - ServerCmd=${dmcfg.xserverBin} ${dmcfg.xserverArgs} + ServerCmd=${dmcfg.xserverBin} ${toString dmcfg.xserverArgs} # KDM calls `rm' somewhere to clean up some temporary directory. SystemPath=${pkgs.coreutils}/bin # The default timeout (15) is too short in a heavily loaded boot process. diff --git a/nixos/modules/services/x11/display-managers/lightdm.nix b/nixos/modules/services/x11/display-managers/lightdm.nix index 1d309aa34292..4afef32aaa47 100644 --- a/nixos/modules/services/x11/display-managers/lightdm.nix +++ b/nixos/modules/services/x11/display-managers/lightdm.nix @@ -23,7 +23,7 @@ let else additionalArgs="-logfile /var/log/X.$display.log" fi - exec ${dmcfg.xserverBin} ${dmcfg.xserverArgs} $additionalArgs "$@" + exec ${dmcfg.xserverBin} ${toString dmcfg.xserverArgs} $additionalArgs "$@" ''; usersConf = writeText "users.conf" diff --git a/nixos/modules/services/x11/display-managers/sddm.nix b/nixos/modules/services/x11/display-managers/sddm.nix index dda8d0f7629e..6630b8257e4e 100644 --- a/nixos/modules/services/x11/display-managers/sddm.nix +++ b/nixos/modules/services/x11/display-managers/sddm.nix @@ -14,7 +14,7 @@ let xserverWrapper = pkgs.writeScript "xserver-wrapper" '' #!/bin/sh ${concatMapStrings (n: "export ${n}=\"${getAttr n xEnv}\"\n") (attrNames xEnv)} - exec systemd-cat ${dmcfg.xserverBin} ${dmcfg.xserverArgs} "$@" + exec systemd-cat ${dmcfg.xserverBin} ${toString dmcfg.xserverArgs} "$@" ''; Xsetup = pkgs.writeScript "Xsetup" '' diff --git a/nixos/modules/services/x11/display-managers/slim.nix b/nixos/modules/services/x11/display-managers/slim.nix index ca2ae1a47726..68acde85b5dc 100644 --- a/nixos/modules/services/x11/display-managers/slim.nix +++ b/nixos/modules/services/x11/display-managers/slim.nix @@ -12,7 +12,7 @@ let '' xauth_path ${dmcfg.xauthBin} default_xserver ${dmcfg.xserverBin} - xserver_arguments ${dmcfg.xserverArgs} + xserver_arguments ${toString dmcfg.xserverArgs} sessiondir ${dmcfg.session.desktops} login_cmd exec ${pkgs.stdenv.shell} ${dmcfg.session.script} "%session" halt_cmd ${config.systemd.package}/sbin/shutdown -h now