setup caddy for ssl via dns with cloudflare
This commit is contained in:
@@ -67,11 +67,6 @@ in {
|
||||
acme_dns cloudflare {env.CLOUDFLARE_API_TOKEN}
|
||||
'';
|
||||
|
||||
# make cloudflare token readable
|
||||
systemd.services.caddy.serviceConfig = {
|
||||
EnvironmentFile = sec."cloudflare/api_token_caddy".path;
|
||||
};
|
||||
|
||||
# static page for hosting key files
|
||||
virtualHosts = {
|
||||
"keys.${homelab.base_domain}" = lib.mkIf cfg.keys {
|
||||
@@ -85,6 +80,11 @@ in {
|
||||
};
|
||||
};
|
||||
|
||||
# make cloudflare token readable
|
||||
systemd.services.caddy.serviceConfig = {
|
||||
EnvironmentFile = sec."cloudflare/api_token_caddy".path;
|
||||
};
|
||||
|
||||
# enable acme for auto ssl certs with lets encrypt
|
||||
security.acme = {
|
||||
acceptTerms = true;
|
||||
|
||||
Reference in New Issue
Block a user