From d8c02837a972f2e393bdcdd504d1de3aac00578e Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Tue, 16 Apr 2024 06:58:21 +0100 Subject: [PATCH] Add radicale CalDAV/CardDAV server --- flake.nix | 3 ++- services/radicale.nix | 21 +++++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 services/radicale.nix diff --git a/flake.nix b/flake.nix index c4e43749..aff86c73 100644 --- a/flake.nix +++ b/flake.nix @@ -176,11 +176,12 @@ Legion = systemConfig { hostName = "Legion"; systemModules = [ - ./services/nix-serve.nix ./services/caddy.nix ./services/forgejo.nix ./services/grafana.nix ./services/minecraft.nix + ./services/nix-serve.nix + ./services/radicale.nix ./services/sshd.nix ./services/syncthing.nix ]; diff --git a/services/radicale.nix b/services/radicale.nix new file mode 100644 index 00000000..7b52da27 --- /dev/null +++ b/services/radicale.nix @@ -0,0 +1,21 @@ +{...}: 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} + ''; +}