nixos/wakapi: fix incorrect assertion conditions
Using implication here (->) causes the assertions to fail haphazardly due to the ordering *implied* by the operator. By using AND, we avoid this case. Unsurprisingly, this was caught by the NixOS test.
This commit is contained in:
parent
fbec0c0d7f
commit
a466f14627
@ -182,11 +182,11 @@ in
|
||||
message = "Either `services.wakapi.passwordSalt` or `services.wakapi.passwordSaltFile` must be set.";
|
||||
}
|
||||
{
|
||||
assertion = cfg.passwordSalt != null -> cfg.passwordSaltFile != null;
|
||||
assertion = !(cfg.passwordSalt != null && cfg.passwordSaltFile != null);
|
||||
message = "Both `services.wakapi.passwordSalt` `services.wakapi.passwordSaltFile` should not be set at the same time.";
|
||||
}
|
||||
{
|
||||
assertion = cfg.smtpPassword != null -> cfg.smtpPasswordFile != null;
|
||||
assertion = !(cfg.smtpPassword != null && cfg.smtpPasswordFile != null);
|
||||
message = "Both `services.wakapi.smtpPassword` `services.wakapi.smtpPasswordFile` should not be set at the same time.";
|
||||
}
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user