From ce831333a24011d0692f6871047fe74eab9fab8c Mon Sep 17 00:00:00 2001 From: "quentin@aristote.fr" Date: Sun, 29 Nov 2026 17:24:18 +0100 Subject: initial commit --- config/services/dav/default.nix | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 config/services/dav/default.nix (limited to 'config/services/dav/default.nix') diff --git a/config/services/dav/default.nix b/config/services/dav/default.nix new file mode 100644 index 0000000..2157ad0 --- /dev/null +++ b/config/services/dav/default.nix @@ -0,0 +1,30 @@ +{ config, pkgs, ... }: + +{ + services.radicale = { + enable = true; + settings = { + auth = { + type = "htpasswd"; + # generate with + # nix shell nixpkgs#apacheHttpd --command htpasswd -cB .htpasswd username + htpasswd_filename = "/etc/radicale/.htpasswd"; + htpasswd_encryption = "bcrypt"; + }; + storage = { + filesystem_folder = "/srv/dav/collections"; + hook = "${ + pkgs.writers.writePython3Bin "create-bday-cal" { + libraries = with pkgs.python3Packages; [ + python-dateutil + vobject + ]; + } (builtins.readFile ./create-bday-cal.py) + }/bin/create-bday-cal"; + }; + web.type = "none"; + }; + }; + + systemd.services.radicale.personal.monitor = true; +} -- cgit v1.3.1