The mailman service, enabled with services.mailman.enable = true, throws an assertion error when services.mailman.serve.enable = false and services.mailman.webHosts = [].
Steps To Reproduce
Steps to reproduce the behavior:
Enable mailman with services.mailman.enable = true and services.mailman.serve.enable = false
Try to build the configuration
Get a failed assertion "services.mailman.serve.enable requires there to be at least one entry in services.mailman.webHosts"
Expected behavior
No failed assertion about services.mailman.webHosts being empty if services.mailman.serve.enable = false.
I think the following assertion:
{ assertion = cfg.webHosts != [];
message = ''
services.mailman.serve.enable requires there to be at least one entry
in services.mailman.webHosts.
'';
}
should be wrapped in a lib.optionals cfg.serve.enable.
Describe the bug
The mailman service, enabled with
services.mailman.enable = true
, throws an assertion error whenservices.mailman.serve.enable = false
andservices.mailman.webHosts = []
.Steps To Reproduce
Steps to reproduce the behavior:
services.mailman.enable = true
andservices.mailman.serve.enable = false
Expected behavior
No failed assertion about
services.mailman.webHosts
being empty ifservices.mailman.serve.enable = false
.I think the following assertion:
should be wrapped in a
lib.optionals cfg.serve.enable
.Notify maintainers
@lheckemann @Ma27