fix: always require ACME email
This commit is contained in:
parent
dedd95c442
commit
c0a33e111a
2 changed files with 8 additions and 11 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
args@{ config, lib, ... }:
|
{ config, lib, ... }:
|
||||||
{
|
{
|
||||||
imports = [ ../options.nix ];
|
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";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,13 +9,17 @@
|
||||||
https = lib.mkOption {
|
https = lib.mkOption {
|
||||||
type = lib.types.boolByOr;
|
type = lib.types.boolByOr;
|
||||||
default = true;
|
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 {
|
acmeEmail = lib.mkOption {
|
||||||
type = lib.types.nullOr lib.types.str;
|
type = lib.types.str;
|
||||||
default = null;
|
default = null;
|
||||||
description = "Email address for ACME.";
|
description = "Email address to provide to the ACME service.";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue