From c5a83f0943b0e1c356e69904ef1e3662dbf60d34 Mon Sep 17 00:00:00 2001 From: Erwin Boskma Date: Tue, 7 May 2024 17:15:09 +0200 Subject: [PATCH] caddy-proxy: I have a feeling the snippet import thingy is not working --- modules/caddy-proxy/default.nix | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/modules/caddy-proxy/default.nix b/modules/caddy-proxy/default.nix index 2078485..969e005 100644 --- a/modules/caddy-proxy/default.nix +++ b/modules/caddy-proxy/default.nix @@ -22,11 +22,18 @@ let }; }; + cloudflare-tls = '' + tls { + dns cloudflare {env.CF_API_TOKEN} + propagation_timeout -1 + } + ''; + mkProxyHost = target: { extraConfig = '' reverse_proxy ${target} - import cloudflare-tls + ${cloudflare-tls} ''; }; @@ -42,7 +49,7 @@ let error "Nope." 403 } - import cloudflare-tls + ${cloudflare-tls} ''; }; in @@ -65,14 +72,7 @@ in acmeCA = "https://acme-v02.api.letsencrypt.org/directory"; - extraConfig = '' - (cloudflare-tls) { - tls { - dns cloudflare {env.CF_API_TOKEN} - propagation_timeout -1 - } - } - ''; + extraConfig = ''''; virtualHosts = builtins.listToAttrs ( map (