From b5699e240d3f7aa289d75c531a9ff5e26c4e3760 Mon Sep 17 00:00:00 2001 From: Kumar Damani Date: Mon, 14 Sep 2026 15:56:22 -0400 Subject: caldav config --- nix/per-host/caldav/configuration.nix | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 nix/per-host/caldav/configuration.nix (limited to 'nix/per-host/caldav') diff --git a/nix/per-host/caldav/configuration.nix b/nix/per-host/caldav/configuration.nix new file mode 100644 index 0000000..627310a --- /dev/null +++ b/nix/per-host/caldav/configuration.nix @@ -0,0 +1,27 @@ +{ config, pkgs, modulesPath, lib, system, ... }: + +{ + config = { + sops.age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ]; + sops.defaultSopsFile = ../../secrets/caldav.yaml; + sops.secrets."radicale/users" = { + owner = "radicale"; + restartUnits = [ "radicale.service" ]; + }; + + networking.hostName = "caldav"; + networking.firewall.allowedTCPPorts = [ 5232 ]; + + services.radicale = { + enable = true; + settings = { + server.hosts = [ "0.0.0.0:5232" ]; + auth = { + type = "htpasswd"; + htpasswd_filename = config.sops.secrets."radicale/users".path; + htpasswd_encryption = "bcrypt"; + }; + }; + }; + }; +} -- cgit v1.2.3