From 52e3799550a6315cb9b182bfd366e0c1b712ec55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Mon, 20 Feb 2023 10:43:30 +0100 Subject: nixos/lipwig: proxy radicale instead of direct access --- nixos/machine/lipwig.nix | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'nixos') diff --git a/nixos/machine/lipwig.nix b/nixos/machine/lipwig.nix index 5483436..2346b3b 100644 --- a/nixos/machine/lipwig.nix +++ b/nixos/machine/lipwig.nix @@ -29,8 +29,15 @@ with lib; { serverAliases = [ "grafana.cynerd.cz" ]; - locations."/" = { - root = ../../web; + locations = { + "/".root = ../../web; + "/radicale/" = { + proxyPass = "http://127.0.0.1:5232/"; + extraConfig = '' + proxy_set_header X-Script-Name /radicale; + proxy_pass_header Authorization; + ''; + }; }; }; "git.cynerd.cz" = { @@ -120,12 +127,7 @@ with lib; { permission = "rw"; }; settings = { - server = { - hosts = ["0.0.0.0:5232" "[::]:5232"]; - ssl = true; - certificate = "/run/secrets/radicale.crt"; - key = "/run/secrets/radicale.key"; - }; + server.hosts = ["0.0.0.0:5232" "[::]:5232"]; encoding = { request = "utf-8"; stock = "utf-8"; -- cgit v1.2.3