1
0

Install dav server on web-2

This commit is contained in:
clerie 2021-01-05 20:25:16 +01:00
parent 6baadff06d
commit faa4251d3d
2 changed files with 33 additions and 1 deletions

View File

@ -8,6 +8,7 @@
./bubblesort.nix
./ip.nix
./meow.nix
./radicale.nix
./znc.nix
];
@ -32,7 +33,6 @@
recommendedOptimisation = true;
recommendedProxySettings = true;
recommendedTlsSettings = true;
};
networking.firewall.allowedTCPPorts = [ 80 443 ];

32
hosts/web-2/radicale.nix Normal file
View File

@ -0,0 +1,32 @@
{ ... }:
{
services.radicale = {
enable = true;
config = ''
[server]
hosts = 127.0.0.1:61865
[auth]
type = htpasswd
htpasswd_filename = /var/src/secrets/radicale/htpasswd
htpasswd_encryption = bcrypt
[storage]
filesystem_folder = /var/lib/radicale/collections
'';
};
services.nginx.virtualHosts."dav.clerie.de" = {
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://127.0.0.1:61865";
extraConfig = ''
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_pass_header Authorization;
'';
};
};
}