aboutsummaryrefslogtreecommitdiff
path: root/nixos/machine
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2023-02-20 10:43:30 +0100
committerKarel Kočí <cynerd@email.cz>2023-02-20 10:43:30 +0100
commit52e3799550a6315cb9b182bfd366e0c1b712ec55 (patch)
tree557aaabcd7275e89d19e93469812e563a8a9aca1 /nixos/machine
parentcf93e121e8d43c5d368aacb6a1f455deb1fe77f9 (diff)
downloadnixos-personal-52e3799550a6315cb9b182bfd366e0c1b712ec55.tar.gz
nixos-personal-52e3799550a6315cb9b182bfd366e0c1b712ec55.tar.bz2
nixos-personal-52e3799550a6315cb9b182bfd366e0c1b712ec55.zip
nixos/lipwig: proxy radicale instead of direct access
Diffstat (limited to 'nixos/machine')
-rw-r--r--nixos/machine/lipwig.nix18
1 files changed, 10 insertions, 8 deletions
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";