diff --git a/system/services/radicale.nix b/system/services/radicale.nix deleted file mode 100644 index 028a0389..00000000 --- a/system/services/radicale.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ ... }: -let - port = "5232"; -in -{ - services.radicale = { - enable = true; - settings = { - server = { - hosts = [ "0.0.0.0:${port}" ]; - }; - auth = { - type = "htpasswd"; - htpasswd_filename = "/etc/radicale/users"; - delay = 1; - }; - }; - # rights = {}; - }; - services.caddy.virtualHosts."cal.xenia.me.uk".extraConfig = '' - reverse_proxy http://localhost:${port} - ''; -} diff --git a/system/services/xandikos.nix b/system/services/xandikos.nix new file mode 100644 index 00000000..1a55bc67 --- /dev/null +++ b/system/services/xandikos.nix @@ -0,0 +1,20 @@ +{ ... }: +let + port = "5232"; +in +{ + services.xandikos = { + inherit port; + enable = true; + routePrefix = "/cal"; + extraOptions = [ "--defaults" ]; + }; + services.caddy.virtualHosts."cal.xenia.me.uk".extraConfig = '' + basicauth { + pixelifytica $2a$14$AwYqa81IWL8lU7B5SrQhlOILZj4VqCgcIn9cte8nytQIP/WhfJoSG + } + respond /.well-known/caldav http://localhost:${port}/user/calendars + respond /.well-known/carddav http://localhost:${port}/user/contacts + reverse_proxy http://localhost:${port} + ''; +}