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";
|
example = "plasma5";
|
||||||
description = "Default desktop manager loaded if none have been chosen.";
|
description = "Default desktop manager loaded if none have been chosen.";
|
||||||
apply = defaultDM:
|
apply = defaultDM:
|
||||||
if defaultDM == "" && cfg.session.list != [] then
|
if defaultDM == "none" && cfg.session.list != [] then
|
||||||
(head cfg.session.list).name
|
(head cfg.session.list).name
|
||||||
else if any (w: w.name == defaultDM) cfg.session.list then
|
else if any (w: w.name == defaultDM) cfg.session.list then
|
||||||
defaultDM
|
defaultDM
|
||||||
|
@ -61,7 +61,9 @@ in
|
|||||||
example = "wmii";
|
example = "wmii";
|
||||||
description = "Default window manager loaded if none have been chosen.";
|
description = "Default window manager loaded if none have been chosen.";
|
||||||
apply = defaultWM:
|
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
|
defaultWM
|
||||||
else
|
else
|
||||||
throw "Default window manager (${defaultWM}) not found.";
|
throw "Default window manager (${defaultWM}) not found.";
|
||||||
|
@ -562,7 +562,9 @@ in
|
|||||||
+ concatMapStringsSep ", " (x: x.output) primaryHeads;
|
+ concatMapStringsSep ", " (x: x.output) primaryHeads;
|
||||||
})
|
})
|
||||||
{ assertion = cfg.desktopManager.default == "none" && cfg.windowManager.default == "none" -> cfg.plainX;
|
{ 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…
x
Reference in New Issue
Block a user