From bb38eee42fd95bb4b1f356e430c75c1dfca937f1 Mon Sep 17 00:00:00 2001 From: Yan Lin Date: Fri, 12 Sep 2025 09:09:54 +0200 Subject: [PATCH] Add local proxy to webdav --- hosts/nixos/hs/proxy.nix | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/hosts/nixos/hs/proxy.nix b/hosts/nixos/hs/proxy.nix index faa93b3..ab2891e 100644 --- a/hosts/nixos/hs/proxy.nix +++ b/hosts/nixos/hs/proxy.nix @@ -15,7 +15,21 @@ }]; }; }; + + # WebDAV file server + files = { + rule = "Host(`files.${config.networking.hostName}.yanlincs.com`)"; + entrypoints = "websecure"; + service = "files"; + tls = { + certResolver = "cloudflare"; + domains = [{ + main = "*.${config.networking.hostName}.yanlincs.com"; + }]; + }; + }; }; + services = { syncthing = { loadBalancer = { @@ -24,7 +38,16 @@ }]; }; }; + + # WebDAV file server + files = { + loadBalancer = { + servers = [{ + url = "http://localhost:5009"; + }]; + }; + }; }; }; }; -} \ No newline at end of file +}