nixos/services/acme.nix

20 lines
328 B
Nix
Raw Normal View History

2023-09-11 20:23:04 +02:00
{
options,
config,
lib,
fn,
pkgs,
...
}:
with builtins;
2023-09-11 20:23:04 +02:00
with lib; let
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}";
};
}