nixos/services.xserver: Fix legacy options for default wm without dm
We switched to unified default session option services.xserver.displayManager.defaultSession and included fallback path for the legacy options. Unfortunately when only services.xserver.windowManager.default is set and not services.xserver.desktopManager.default, it got incorrectly converted to the new option. This should fix that. Closes: https://github.com/NixOS/nixpkgs/issues/76684
This commit is contained in:
parent
a21c2fa3ea
commit
bd9c5b933c
@ -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.
|
||||
''
|
||||
];
|
||||
|
Loading…
x
Reference in New Issue
Block a user