diff --git a/modules/system/services/caddy.nix b/modules/system/services/caddy.nix index 1573e4c..c2ce956 100644 --- a/modules/system/services/caddy.nix +++ b/modules/system/services/caddy.nix @@ -131,6 +131,7 @@ in extraConfig = let mkHostConfig = value: '' + encode import subdomain-log ${value.domain} @${value.domain |> getSubdomain} host ${(lib.optionalString (!value.tls) "http://") + value.domain} handle @${value.domain |> getSubdomain} { @@ -171,6 +172,7 @@ in logFormat = "output file ${config.services.caddy.logDir}/${value.domain}.log { mode 640 }"; extraConfig = '' bind tailscale/${getSubdomain value.domain} + encode reverse_proxy localhost:${builtins.toString value.port} ${ lib.optionalString (value.extraReverseProxyConfig != "") "{ ${value.extraReverseProxyConfig} }" }