nixos GDM: fix #19896
- As noted on github, GDM needs different parameters for X. - Making xserverArgs a true list instead of concat-string helps to filter it and it feels more correct anyway. - Tested: gdm+gnome, lightdm+gnome. There seems to be no logout option in gnome, and gdm doesn't offer other sessions, but maybe these are normal.
This commit is contained in:
parent
fd6dbd9d17
commit
a1ae627362
6 changed files with 10 additions and 6 deletions
|
@ -187,7 +187,6 @@ in
|
|||
default = [];
|
||||
example = [ "-ac" "-logverbose" "-verbose" "-nolisten tcp" ];
|
||||
description = "List of arguments for the X server.";
|
||||
apply = toString;
|
||||
};
|
||||
|
||||
sessionCommands = mkOption {
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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" ''
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue