diff --git a/sys/platforms/vps/srv/default.nix b/sys/platforms/vps/srv/default.nix index 3f3510e..e56a3da 100644 --- a/sys/platforms/vps/srv/default.nix +++ b/sys/platforms/vps/srv/default.nix @@ -20,5 +20,6 @@ with lib; { ./dufs.nix ./isso.nix ./miniflux.nix + ./radicale.nix ]; } diff --git a/sys/platforms/vps/srv/radicale.nix b/sys/platforms/vps/srv/radicale.nix new file mode 100644 index 0000000..1b7b5eb --- /dev/null +++ b/sys/platforms/vps/srv/radicale.nix @@ -0,0 +1,41 @@ +{ + lib, + pkgs, + ... +}: +with lib; { + services = { + nginx = { + virtualHosts."dav.posixlycorrect.com" = { + enableACME = true; + forceSSL = true; + extraConfig = '' + proxy_headers_hash_max_size 512; + proxy_headers_hash_bucket_size 128; + ''; + locations."/" = { + proxyPass = "http://127.0.0.1:5232"; + }; + }; + }; + + radicale = { + enable = true; + settings = { + server = { + hosts = [ "127.0.0.1:5232" ]; + }; + auth = { + type = "htpasswd"; + htpasswd_filename = "/var/trust/radicale/htpasswd"; + htpasswd_encryption = "bcrypt"; + }; + storage = { + filesystem_folder = "/var/lib/radicale/collections"; + }; + web.type = "internal"; + rights.type = "authenticated"; + }; + }; + }; +}