nixos/acme: fix assertion, add actual values to message (#263543)
This commit is contained in:
parent
56ffb3d80f
commit
5438b83028
@ -938,13 +938,10 @@ in {
|
|||||||
and remove the wildcard from the path.
|
and remove the wildcard from the path.
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
{
|
(let exclusiveAttrs = {
|
||||||
assertion = lib.length (lib.filter (x: x != null) [
|
inherit (data) dnsProvider webroot listenHTTP s3Bucket;
|
||||||
data.dnsProvider
|
}; in {
|
||||||
data.webroot
|
assertion = lib.length (lib.filter (x: x != null) (builtins.attrValues exclusiveAttrs)) == 1;
|
||||||
data.listenHTTP
|
|
||||||
data.s3Bucket
|
|
||||||
]) != 1;
|
|
||||||
message = ''
|
message = ''
|
||||||
Exactly one of the options
|
Exactly one of the options
|
||||||
`security.acme.certs.${cert}.dnsProvider`,
|
`security.acme.certs.${cert}.dnsProvider`,
|
||||||
@ -952,8 +949,9 @@ in {
|
|||||||
`security.acme.certs.${cert}.listenHTTP` and
|
`security.acme.certs.${cert}.listenHTTP` and
|
||||||
`security.acme.certs.${cert}.s3Bucket`
|
`security.acme.certs.${cert}.s3Bucket`
|
||||||
is required.
|
is required.
|
||||||
|
Current values: ${(lib.generators.toPretty {} exclusiveAttrs)}.
|
||||||
'';
|
'';
|
||||||
}
|
})
|
||||||
{
|
{
|
||||||
assertion = all (hasSuffix "_FILE") (attrNames data.credentialFiles);
|
assertion = all (hasSuffix "_FILE") (attrNames data.credentialFiles);
|
||||||
message = ''
|
message = ''
|
||||||
|
Loading…
Reference in New Issue
Block a user