summaryrefslogtreecommitdiff
path: root/modules/xnet/users/radicale.nix
blob: 7d752f09355b2d367c979bd0e186f2d2b03cdb16 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
{ config, ... }:
let path = "/persist/data/radicale"; in {
  services.radicale = {
    enable = false;
    settings = {
      server.hosts = [ "127.0.0.1:5232" ];
      storage.filesystem_folder = "${path}/collections";
      auth = {
        type = "htpasswd";
        htpasswd_filename = "${path}/users";
        htpasswd_encryption = "plain";
      };
    };
  };

  systemd.tmpfiles.rules = [
    "d ${path} 0700 radicale radicale -"
    "Z ${path} 0700 radicale radicale - -"
  ];

  services.nginx.virtualHosts."dav.web.4kb.net" = {
    useACMEHost = "4kb.net";
    forceSSL = true;
    locations."/" = {
      proxyPass = "http://127.0.0.1:5232/";
    };
  };
}