mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 21:50:33 +03:00
nixos/display.managers: use cfg where possible
This commit is contained in:
parent
7e96a7c4e5
commit
4b1e83e97c
1 changed files with 2 additions and 2 deletions
|
@ -113,7 +113,7 @@ in
|
|||
type = lib.types.nullOr lib.types.str // {
|
||||
description = "session name";
|
||||
check = d:
|
||||
lib.assertMsg (d != null -> (lib.types.str.check d && lib.elem d config.services.displayManager.sessionData.sessionNames)) ''
|
||||
lib.assertMsg (d != null -> (lib.types.str.check d && lib.elem d cfg.sessionData.sessionNames)) ''
|
||||
Default graphical session, '${d}', not found.
|
||||
Valid names for 'services.displayManager.defaultSession' are:
|
||||
${lib.concatStringsSep "\n " cfg.sessionData.sessionNames}
|
||||
|
@ -187,7 +187,7 @@ in
|
|||
|
||||
services.displayManager.sessionData = {
|
||||
desktops = installedSessions;
|
||||
sessionNames = lib.concatMap (p: p.providedSessions) config.services.displayManager.sessionPackages;
|
||||
sessionNames = lib.concatMap (p: p.providedSessions) cfg.sessionPackages;
|
||||
# We do not want to force users to set defaultSession when they have only single DE.
|
||||
autologinSession =
|
||||
if cfg.defaultSession != null then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue