nixos-config/modules/services/radicale.nix

39 lines
976 B
Nix
Raw Permalink Normal View History

2024-12-03 09:21:50 +01:00
{ ... }:
{
services.radicale = {
enable = true;
settings = {
server.hosts = [ "0.0.0.0:5232" ];
auth = {
type = "htpasswd";
2024-12-19 18:18:14 +01:00
htpasswd_filename = "/etc/radicale/htpasswd";
2024-12-03 09:21:50 +01:00
htpasswd_encryption = "bcrypt";
};
};
};
2024-12-05 12:58:32 +01:00
services.nginx = {
enable = true;
recommendedProxySettings = true;
recommendedTlsSettings = true;
virtualHosts = {
2024-12-19 18:18:14 +01:00
"plan.liv.town" = {
2024-12-05 12:58:32 +01:00
forceSSL = true;
sslCertificate = "/var/lib/acme/liv.town/cert.pem";
sslCertificateKey = "/var/lib/acme/liv.town/key.pem";
# locations."/radicale/" = {
locations."/" = {
proxyPass = "http://127.0.0.1:5232/";
2024-12-19 18:18:14 +01:00
proxyWebsockets = true;
extraConfig = ''
proxy_connect_timeout 300;
proxy_send_timeout 300;
proxy_read_timeout 300;
send_timeout 300;
'';
2024-12-05 12:58:32 +01:00
};
};
};
};
2024-12-03 09:21:50 +01:00
}