selfprivacy-nixos-config/letsencrypt/acme.nix

29 lines
775 B
Nix
Raw Normal View History

2022-02-16 05:01:12 +00:00
{ config, pkgs, lib, ... }:
2021-11-15 10:02:05 +00:00
let
cfg = config.services.userdata;
in
{
users.groups.acmerecievers = {
members = [ "nginx" "dovecot2" "postfix" "virtualMail" "ocserv" ];
};
security.acme = {
acceptTerms = true;
email = "${cfg.username}@${cfg.domain}";
certs = lib.mkForce {
2021-11-15 10:02:05 +00:00
"${cfg.domain}" = {
domain = "*.${cfg.domain}";
extraDomainNames = [ "${cfg.domain}" ];
group = "acmerecievers";
dnsProvider = "cloudflare";
credentialsFile = "/var/lib/cloudflare/Credentials.ini";
2021-11-15 10:02:05 +00:00
};
2022-02-15 12:09:45 +00:00
"meet.${cfg.domain}" = {
domain = "meet.${cfg.domain}";
group = "acmerecievers";
dnsProvider = "cloudflare";
credentialsFile = "/var/lib/cloudflare/Credentials.ini";
};
2021-11-15 10:02:05 +00:00
};
};
}