Closed archer-65 closed 2 months ago
Sorry for only noticing this issue now, and you've probably already figured this out by now, but the problem is with the predicate function. Yours is only searching for a top-level enabled
property, and not nested ones. They'd need to be rewritten to:
{
assertion = (countAttrs (_: v: v.enable or false) cfgXorg) < 2;
message = "[Xorg] Can't have more than one WM/DE enable at a time.";
}
{
assertion = (countAttrs (_: v: v.enable or false) cfgWayland) < 2;
message = "[Wayland] Can't have more than one WM/DE enable at a time.";
}
Hope that helps someone!
What did you expect to happen?
Here we are. My nix-fu isn't great, but maybe I found an issue with this function. I'm trying to use
countAttrs
as done in this assertion.I have a similar setup for my WMs, like that:
Something like this should print a backtrace!
What actually happened?
The evaluation continues, instead of printing the backtrace.
Describe your attempts to resolve the issue
No response
Steps to reproduce
Enable at least two WMs (I'm using your functions for the same purpose)
Package commit
089f1a9da9018df9e5fc200c2d7bef70f4546026
System Information
No response