diff --git a/modules/forgejo/options.nix b/modules/forgejo/options.nix index 9b392af..b48a84d 100644 --- a/modules/forgejo/options.nix +++ b/modules/forgejo/options.nix @@ -42,4 +42,11 @@ args@{ config, lib, ... }: }; }; }; + + config.assertions = lib.mkIf config.aether.https [ + { + assertion = !(builtins.isNull config.aether.acmeEmail); + message = "HTTPS support requires providing a contact email"; + } + ]; } diff --git a/modules/options.nix b/modules/options.nix index 944814d..5d606d0 100644 --- a/modules/options.nix +++ b/modules/options.nix @@ -12,8 +12,8 @@ }; acmeEmail = lib.mkOption { - type = lib.types.str; - default = ""; + type = lib.types.nullOr lib.types.str; + default = null; description = "Email address for ACME."; }; }