diff options
author | Tor Hedin Brønner <torhedinbronner@gmail.com> | 2019-01-12 08:33:05 +0100 |
---|---|---|
committer | Jan Tojnar <jtojnar@gmail.com> | 2019-12-15 04:16:18 +0100 |
commit | dd7144b8601958562d78f795abcab4668404d15d (patch) | |
tree | e2f2e0a620ccfa455ad701e6d1add0969d0b8eae /nixos/modules/services/x11/display-managers | |
parent | d362df6682d3506e17c069f95cb39b10e516d123 (diff) |
nixos/sessionPackages: provide session names in passthru
We want access to the valid session names at evaluation time.
Diffstat (limited to 'nixos/modules/services/x11/display-managers')
-rw-r--r-- | nixos/modules/services/x11/display-managers/default.nix | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/nixos/modules/services/x11/display-managers/default.nix b/nixos/modules/services/x11/display-managers/default.nix index 4a75787f715e..4dc06b30c7a5 100644 --- a/nixos/modules/services/x11/display-managers/default.nix +++ b/nixos/modules/services/x11/display-managers/default.nix @@ -263,7 +263,20 @@ in }; sessionPackages = mkOption { - type = types.listOf types.package; + type = with types; listOf (package // { + description = "package with provided sessions"; + check = p: assertMsg + (package.check p && p ? providedSessions + && p.providedSessions != [] && all isString p.providedSessions) + '' + Package, '${p.name}', did not specify any session names, as strings, in + 'passthru.providedSessions'. This is required when used as a session package. + + The session names can be looked up in: + ${p}/share/xsessions + ${p}/share/wayland-sessions + ''; + }); default = []; description = '' A list of packages containing x11 or wayland session files to be passed to the display manager. |