mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 23:43:30 +00:00
services.xserver: fix apply
of default DM/WM
This is needed to pick the first enabled DM/WM if the default is `none`
This commit is contained in:
parent
5b70c1855b
commit
410f0f0db2
@ -91,7 +91,7 @@ in
|
||||
example = "plasma5";
|
||||
description = "Default desktop manager loaded if none have been chosen.";
|
||||
apply = defaultDM:
|
||||
if defaultDM == "" && cfg.session.list != [] then
|
||||
if defaultDM == "none" && cfg.session.list != [] then
|
||||
(head cfg.session.list).name
|
||||
else if any (w: w.name == defaultDM) cfg.session.list then
|
||||
defaultDM
|
||||
|
@ -61,7 +61,9 @@ in
|
||||
example = "wmii";
|
||||
description = "Default window manager loaded if none have been chosen.";
|
||||
apply = defaultWM:
|
||||
if any (w: w.name == defaultWM) cfg.session then
|
||||
if defaultWM == "none" && cfg.session != [] then
|
||||
(head cfg.session).name
|
||||
else if any (w: w.name == defaultWM) cfg.session then
|
||||
defaultWM
|
||||
else
|
||||
throw "Default window manager (${defaultWM}) not found.";
|
||||
|
@ -562,7 +562,9 @@ in
|
||||
+ concatMapStringsSep ", " (x: x.output) primaryHeads;
|
||||
})
|
||||
{ assertion = cfg.desktopManager.default == "none" && cfg.windowManager.default == "none" -> cfg.plainX;
|
||||
message = "Either the desktop manager or the window manager shouldn't be `none`! To explicitly allow this, you can also set `services.xserver.plainX` to `true`.";
|
||||
message = "Either the desktop manager or the window manager shouldn't be `none`! "
|
||||
+ "To explicitly allow this, you can also set `services.xserver.plainX` to `true`. "
|
||||
+ "The `default` value looks for enabled WMs/DMs and select the first one.";
|
||||
}
|
||||
];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user