1
0
nixfiles/hosts/web-2/radicale.nix

42 lines
904 B
Nix
Raw Permalink Normal View History

2023-05-02 20:52:00 +02:00
{ config, ... }:
2021-01-05 20:25:16 +01:00
{
2023-05-02 20:52:00 +02:00
age.secrets.radicale-htpasswd = {
owner = "radicale";
group = "radicale";
};
2021-01-05 20:25:16 +01:00
services.radicale = {
enable = true;
settings = {
server = {
hosts = [ "127.0.0.1:61865" ];
};
auth = {
type = "htpasswd";
2023-05-02 20:52:00 +02:00
htpasswd_filename = config.age.secrets.radicale-htpasswd.path;
htpasswd_encryption = "bcrypt";
};
storage = {
filesystem_folder = "/var/lib/radicale/collections";
};
};
2021-01-05 20:25:16 +01:00
};
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;
'';
};
2023-03-15 22:50:08 +01:00
extraConfig = ''
access_log off;
'';
2021-01-05 20:25:16 +01:00
};
}