aboutsummaryrefslogtreecommitdiff
path: root/nix/per-host
diff options
context:
space:
mode:
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";
+ };
+ };
+ };
+ };
+}