diff options
author | Tor Hedin Brønner <torhedinbronner@gmail.com> | 2019-01-12 08:43:24 +0100 |
---|---|---|
committer | Jan Tojnar <jtojnar@gmail.com> | 2019-12-15 04:16:20 +0100 |
commit | 58e5290fcee60178973f4cc21011fbbf03497410 (patch) | |
tree | ec123a05d1b82280f81ce0e41125d6d3711e955b /nixos/modules/services/x11/display-managers | |
parent | dd7144b8601958562d78f795abcab4668404d15d (diff) |
nixos/displayManager: check for provided sessions in mkDesktops
Diffstat (limited to 'nixos/modules/services/x11/display-managers')
-rw-r--r-- | nixos/modules/services/x11/display-managers/default.nix | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/nixos/modules/services/x11/display-managers/default.nix b/nixos/modules/services/x11/display-managers/default.nix index 4dc06b30c7a5..f55bfbfd0c10 100644 --- a/nixos/modules/services/x11/display-managers/default.nix +++ b/nixos/modules/services/x11/display-managers/default.nix @@ -191,13 +191,18 @@ let '') names} ${concatMapStrings (pkg: '' + for n in ${concatStringsSep " " pkg.providedSessions}; do + if ! test -f ${pkg}/share/wayland-sessions/$n.desktop -o \ + -f ${pkg}/share/xsessions/$n.desktop; then + echo "Couldn't find provided session name, $n.desktop, in session package ${pkg.name}:" + echo " ${pkg}" + return 1 + fi + done + if test -d ${pkg}/share/xsessions; then ${xorg.lndir}/bin/lndir ${pkg}/share/xsessions $out/share/xsessions fi - '') cfg.displayManager.sessionPackages} - - - ${concatMapStrings (pkg: '' 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 |