2023-05-02 20:52:00 +02:00
|
|
|
{ config, ... }:
|
2021-01-05 20:25:16 +01:00
|
|
|
|
|
|
|
{
|
2024-05-10 15:36:09 +02:00
|
|
|
sops.secrets.radicale-htpasswd = {
|
2023-05-02 20:52:00 +02:00
|
|
|
owner = "radicale";
|
|
|
|
group = "radicale";
|
|
|
|
};
|
|
|
|
|
2021-01-05 20:25:16 +01:00
|
|
|
services.radicale = {
|
|
|
|
enable = true;
|
2021-12-12 17:30:08 +01:00
|
|
|
settings = {
|
|
|
|
server = {
|
|
|
|
hosts = [ "127.0.0.1:61865" ];
|
|
|
|
};
|
|
|
|
auth = {
|
|
|
|
type = "htpasswd";
|
2024-05-10 15:36:09 +02:00
|
|
|
htpasswd_filename = config.sops.secrets.radicale-htpasswd.path;
|
2021-12-12 17:30:08 +01:00
|
|
|
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
|
|
|
};
|
|
|
|
}
|