nixos/desktopManager: Only trace if the default session isn't found
The default session might be found in `extraSessionFilePackages`, but it's not viable to detect at evaluation time, so emit a warning. In LightDM instead of checking `defaultSessionName` against `displayManager.session.names` we rely on the assertions in `desktopManager` and `windowMananger` and just check that there's at least one default set. The second assertion could never actually be triggered.
This commit is contained in:
@@ -96,13 +96,13 @@ in
|
||||
else if any (w: w.name == defaultDM) cfg.session.list then
|
||||
defaultDM
|
||||
else
|
||||
throw ''
|
||||
Default desktop manager (${defaultDM}) not found.
|
||||
Probably you want to change
|
||||
services.xserver.desktopManager.default = "${defaultDM}";
|
||||
to one of
|
||||
builtins.trace ''
|
||||
Default desktop manager (${defaultDM}) not found at evaluation time.
|
||||
These are the known valid session names:
|
||||
${concatMapStringsSep "\n " (w: "services.xserver.desktopManager.default = \"${w.name}\";") cfg.session.list}
|
||||
'';
|
||||
It's also possible the default can be found in one of these packages:
|
||||
${concatMapStringsSep "\n " (p: p.name) config.services.xserver.displayManager.extraSessionFilePackages}
|
||||
'' defaultDM;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user