services/radicale: init

This commit is contained in:
Kevin Baensch 2025-03-21 23:06:06 +01:00
parent d51f76e020
commit ce2b892880
Signed by: derped
GPG key ID: C0F1D326C7626543
3 changed files with 57 additions and 0 deletions

View file

@ -0,0 +1,30 @@
{
config,
lib,
...
}:
with lib;
let
radicale = config.services.radicale;
in
{
vHost =
if radicale.enable then
{
extraConfig = ''
location / {
proxy_pass http://127.0.0.1:5232/;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $host;
proxy_pass_header Authorization;
}
'';
}
else
{ };
}
.vHost