nixos/services/acme.nix

21 lines
314 B
Nix
Raw Normal View History

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