nixos/services.xserver.displayManager: move X sessions to a subdirectory

Previously, the mkDesktops function produced a flat package containing
session files in the top level. As a preparation for introduction of
Wayland sessions, the files will now be placed to $out/share/xsessions.
This commit is contained in:
Jan Tojnar 2018-05-02 02:31:18 +02:00
parent 7c585235ff
commit a8c6489fd4
No known key found for this signature in database
GPG key ID: 7FAB2A15F7A607A4
5 changed files with 6 additions and 6 deletions

View file

@ -186,9 +186,9 @@ let
allowSubstitutes = false;
}
''
mkdir -p "$out"
mkdir -p "$out/share/xsessions"
${concatMapStrings (n: ''
cat - > "$out/${n}.desktop" << EODESKTOP
cat - > "$out/share/xsessions/${n}.desktop" << EODESKTOP
[Desktop Entry]
Version=1.0
Type=XSession

View file

@ -109,7 +109,7 @@ in
environment = {
GDM_X_SERVER_EXTRA_ARGS = toString
(filter (arg: arg != "-terminate") cfg.xserverArgs);
GDM_SESSIONS_DIR = "${cfg.session.desktops}";
GDM_SESSIONS_DIR = "${cfg.session.desktops}/share/xsessions";
# Find the mouse
XCURSOR_PATH = "~/.icons:${pkgs.gnome3.adwaita-icon-theme}/share/icons";
};

View file

@ -45,7 +45,7 @@ let
greeter-user = ${config.users.users.lightdm.name}
greeters-directory = ${cfg.greeter.package}
''}
sessions-directory = ${dmcfg.session.desktops}
sessions-directory = ${dmcfg.session.desktops}/share/xsessions
[Seat:*]
xserver-command = ${xserverWrapper}

View file

@ -50,7 +50,7 @@ let
ServerPath=${xserverWrapper}
XephyrPath=${pkgs.xorg.xorgserver.out}/bin/Xephyr
SessionCommand=${dmcfg.session.script}
SessionDir=${dmcfg.session.desktops}
SessionDir=${dmcfg.session.desktops}/share/xsessions
XauthPath=${pkgs.xorg.xauth}/bin/xauth
DisplayCommand=${Xsetup}
DisplayStopCommand=${Xstop}

View file

@ -13,7 +13,7 @@ let
xauth_path ${dmcfg.xauthBin}
default_xserver ${dmcfg.xserverBin}
xserver_arguments ${toString dmcfg.xserverArgs}
sessiondir ${dmcfg.session.desktops}
sessiondir ${dmcfg.session.desktops}/share/xsessions
login_cmd exec ${pkgs.runtimeShell} ${dmcfg.session.script} "%session"
halt_cmd ${config.systemd.package}/sbin/shutdown -h now
reboot_cmd ${config.systemd.package}/sbin/shutdown -r now