diff options
author | Tor Hedin Brønner <torhedinbronner@gmail.com> | 2019-01-12 10:31:37 +0100 |
---|---|---|
committer | Jan Tojnar <jtojnar@gmail.com> | 2019-12-15 04:16:20 +0100 |
commit | d25365c3c13f2fcc4e5574f01106c061c493e63e (patch) | |
tree | dda982f84e63f48a3f46b71eb17747d77e6809a4 /nixos/modules/services/x11/display-managers/lightdm.nix | |
parent | 58e5290fcee60178973f4cc21011fbbf03497410 (diff) | |
download | nixpkgs-d25365c3c13f2fcc4e5574f01106c061c493e63e.tar nixpkgs-d25365c3c13f2fcc4e5574f01106c061c493e63e.tar.gz nixpkgs-d25365c3c13f2fcc4e5574f01106c061c493e63e.tar.bz2 nixpkgs-d25365c3c13f2fcc4e5574f01106c061c493e63e.tar.lz nixpkgs-d25365c3c13f2fcc4e5574f01106c061c493e63e.tar.xz nixpkgs-d25365c3c13f2fcc4e5574f01106c061c493e63e.tar.zst nixpkgs-d25365c3c13f2fcc4e5574f01106c061c493e63e.zip |
nixos/displayManager: introduce defaultSession
There's two ways of providing graphical sessions now: - `displayManager.session` via. `desktopManager.session` and `windowManager.session` - `displayManager.sessionPackages` `sessionPackages` doesn't make a distinction between desktop and window managers. This makes selecting a session provided by a package using `desktopManager.default` nonsensical. We therefor introduce `displayManager.defaultSession` which can select a session from either `displayManager.session` or `displayManager.sessionPackages`. It will default to `desktopManager.default + windowManager.default` as before. If the dm default is "none" it will select the first provided session from `sessionPackages`.
Diffstat (limited to 'nixos/modules/services/x11/display-managers/lightdm.nix')
-rw-r--r-- | nixos/modules/services/x11/display-managers/lightdm.nix | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/nixos/modules/services/x11/display-managers/lightdm.nix b/nixos/modules/services/x11/display-managers/lightdm.nix index cf4c05acbcc..71cd6079ea1 100644 --- a/nixos/modules/services/x11/display-managers/lightdm.nix +++ b/nixos/modules/services/x11/display-managers/lightdm.nix @@ -9,9 +9,8 @@ let xEnv = config.systemd.services.display-manager.environment; cfg = dmcfg.lightdm; - dmDefault = xcfg.desktopManager.default; - wmDefault = xcfg.windowManager.default; - hasDefaultUserSession = dmDefault != "none" || wmDefault != "none"; + defaultSessionName = dmcfg.defaultSession; + hasDefaultUserSession = defaultSessionName != "none"; inherit (pkgs) lightdm writeScript writeText; @@ -71,7 +70,6 @@ let ${cfg.extraSeatDefaults} ''; - defaultSessionName = dmDefault + optionalString (wmDefault != "none") ("+" + wmDefault); in { # Note: the order in which lightdm greeter modules are imported @@ -199,7 +197,7 @@ in LightDM auto-login requires services.xserver.displayManager.lightdm.autoLogin.user to be set ''; } - { assertion = cfg.autoLogin.enable -> dmDefault != "none" || wmDefault != "none"; + { assertion = cfg.autoLogin.enable -> hasDefaultUserSession; message = '' LightDM auto-login requires that services.xserver.desktopManager.default and services.xserver.windowManager.default are set to valid values. The current |