Merge pull request #79300 from jtojnar/default-wm-fix

nixos/services.xserver: Fix legacy options for default wm without dm
This commit is contained in:
worldofpeace 2020-02-08 21:28:14 -05:00 committed by GitHub
commit 8396961c9c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -141,9 +141,11 @@ let
'';
dmDefault = cfg.desktopManager.default;
# fallback default for cases when only default wm is set
dmFallbackDefault = if dmDefault != null then dmDefault else "none";
wmDefault = cfg.windowManager.default;
defaultSessionFromLegacyOptions = concatStringsSep "+" (filter (s: s != null) ([ dmDefault ] ++ optional (wmDefault != "none") wmDefault));
defaultSessionFromLegacyOptions = dmFallbackDefault + optionalString (wmDefault != null && wmDefault != "none") "+${wmDefault}";
in
@ -358,7 +360,7 @@ in
{ c = wmDefault; t = "- services.xserver.windowManager.default"; }
]))}
Please use
services.xserver.displayManager.defaultSession = "${concatStringsSep "+" (filter (s: s != null) [ dmDefault wmDefault ])}";
services.xserver.displayManager.defaultSession = "${defaultSessionFromLegacyOptions}";
instead.
''
];