dots/modules/system/common/linux/lets-encrypt.nix
Gene Liverman bae990279c Replace absolute path /home
In 24.11 this is no longer allowed but is easy to grab from config
2024-12-02 21:43:50 -05:00

26 lines
1 KiB
Nix

{ config, username, ... }: {
##########################################################################
# #
# This module sets up Let's Encrypt certs via a DNS challenge to Gandi #
# #
##########################################################################
security.acme = {
acceptTerms = true;
defaults = {
email = "lets-encrypt@technicalissues.us";
credentialFiles = { "GANDIV5_API_KEY_FILE" = "${config.sops.secrets.gandi_api.path}"; };
#credentialFiles = { "GANDIV5_PERSONAL_ACCESS_TOKEN_FILE" = gandi_dns_pat; };
dnsProvider = "gandiv5";
dnsResolver = "ns1.gandi.net";
# uncomment below for testing
#server = "https://acme-staging-v02.api.letsencrypt.org/directory";
};
};
sops = {
age.keyFile = "${config.users.users.${username}.home}/.config/sops/age/keys.txt";
secrets.gandi_api.sopsFile = ../secrets.yaml;
};
}