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; allowSubstitutes = false;
} }
'' ''
mkdir -p "$out" mkdir -p "$out/share/xsessions"
${concatMapStrings (n: '' ${concatMapStrings (n: ''
cat - > "$out/${n}.desktop" << EODESKTOP cat - > "$out/share/xsessions/${n}.desktop" << EODESKTOP
[Desktop Entry] [Desktop Entry]
Version=1.0 Version=1.0
Type=XSession Type=XSession

View File

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

View File

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

View File

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

View File

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