nixos/displayManager: only install wayland sessions if they exist in extraSessionFilePackages

Not everyone is using wayland just yet.
This commit is contained in:
worldofpeace 2018-12-21 22:19:40 -05:00
parent 48d08bea5a
commit 94af8ebde2

View File

@ -194,9 +194,12 @@ let
${xorg.lndir}/bin/lndir ${pkg}/share/xsessions $out/share/xsessions
'') cfg.displayManager.extraSessionFilePackages}
mkdir -p "$out/share/wayland-sessions"
${concatMapStrings (pkg: ''
${xorg.lndir}/bin/lndir ${pkg}/share/wayland-sessions $out/share/wayland-sessions
if test -d ${pkg}/share/wayland-sessions; then
mkdir -p "$out/share/wayland-sessions"
${xorg.lndir}/bin/lndir ${pkg}/share/wayland-sessions $out/share/wayland-sessions
fi
'') cfg.displayManager.extraSessionFilePackages}
'';