aboutsummaryrefslogtreecommitdiff
path: root/nix/per-host
diff options
context:
space:
mode:
authorKumar Damani <me@kumardamani.net>2026-09-14 19:56:22 +0000
committerKumar Damani <me@kumardamani.net>2026-09-14 19:56:22 +0000
commitb5699e240d3f7aa289d75c531a9ff5e26c4e3760 (patch)
treecbf90a217b1ed6bc627c6299e1602f58ae901524 /nix/per-host
parent4156ff5a73185bf49119733493eb6cd360b8795d (diff)
caldav config
Diffstat (limited to 'nix/per-host')
-rw-r--r--nix/per-host/caldav/configuration.nix27
1 files changed, 27 insertions, 0 deletions
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";
+ };
+ };
+ };
+ };
+}