mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-10-06 12:39:54 +03:00
Merge pull request #311376 from SuperSandro2000/display-managers-misc
nixos/display.managers: use cfg where possible
This commit is contained in:
commit
ff610bbb02
@ -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…
Reference in New Issue
Block a user