Simplify assertion
This commit is contained in:
parent
eda854d50f
commit
2fc520d699
@ -631,8 +631,7 @@ in
|
|||||||
config = {
|
config = {
|
||||||
|
|
||||||
assertions = mapAttrsToList (name: service: {
|
assertions = mapAttrsToList (name: service: {
|
||||||
assertion = !hasAttr "Type" service.serviceConfig || service.serviceConfig.Type != "oneshot"
|
assertion = service.serviceConfig.Type or "" == "oneshot" -> service.serviceConfig.Restart or "no" == "no";
|
||||||
|| !hasAttr "Restart" service.serviceConfig || service.serviceConfig.Restart == "no";
|
|
||||||
message = "${name}: Type=oneshot services must have Restart=no";
|
message = "${name}: Type=oneshot services must have Restart=no";
|
||||||
}) cfg.services;
|
}) cfg.services;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user