fix: always require ACME email

This commit is contained in:
Kiana Sheibani 2025-04-02 05:52:23 -04:00
parent dedd95c442
commit c0a33e111a
Signed by: toki
GPG key ID: 6CB106C25E86A9F7
2 changed files with 8 additions and 11 deletions

View file

@ -1,4 +1,4 @@
args@{ config, lib, ... }:
{ config, lib, ... }:
{
imports = [ ../options.nix ];
@ -49,11 +49,4 @@ args@{ config, lib, ... }:
};
};
};
config.assertions = lib.mkIf config.aether.https [
{
assertion = !(builtins.isNull config.aether.acmeEmail);
message = "HTTPS support requires providing a contact email";
}
];
}

View file

@ -9,13 +9,17 @@
https = lib.mkOption {
type = lib.types.boolByOr;
default = true;
description = "Whether to force HTTPS connections for websites.";
description = ''
Whether to force HTTPS connections for websites.
This option is ignored if the service strictly requires HTTPS.
'';
};
acmeEmail = lib.mkOption {
type = lib.types.nullOr lib.types.str;
type = lib.types.str;
default = null;
description = "Email address for ACME.";
description = "Email address to provide to the ACME service.";
};
};
}