2023-09-11 20:23:04 +02:00
|
|
|
{
|
|
|
|
options,
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
fn,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}:
|
2020-03-11 01:53:04 +01:00
|
|
|
with builtins;
|
2023-09-11 20:23:04 +02:00
|
|
|
with lib; let
|
2020-03-11 01:53:04 +01:00
|
|
|
cfg = config.machine;
|
2023-09-11 20:23:04 +02:00
|
|
|
in
|
|
|
|
mkIf (elem "acme" cfg.services) {
|
|
|
|
security.acme = {
|
|
|
|
# see https://letsencrypt.org/repository/
|
|
|
|
acceptTerms = true;
|
|
|
|
defaults.email = "${(elemAt cfg.mailAccounts 0).name}@${cfg.domain}";
|
|
|
|
};
|
|
|
|
}
|