From 03ac2ae15e7f7253a861c2275a0cbf4a9fc5a658 Mon Sep 17 00:00:00 2001 From: kiskaadee Date: Tue, 15 Sep 2026 15:46:19 -0500 Subject: [PATCH] nix(homeserver): declare stalwart tmpfiles permissions and mail firewall ports --- nixos/modules/homeserver.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/nixos/modules/homeserver.nix b/nixos/modules/homeserver.nix index d83a7f1..d96081d 100644 --- a/nixos/modules/homeserver.nix +++ b/nixos/modules/homeserver.nix @@ -92,6 +92,12 @@ }; }; - # Open ports in the firewall for Traefik, Gitea SSH, and GitOps Webhook Receiver - networking.firewall.allowedTCPPorts = [ 80 443 2223 9000 ]; + # Ensure persistent directories have proper permissions for container runtimes (e.g. Stalwart UID 2000) + systemd.tmpfiles.rules = [ + "d /home/kiskaadee/Core/config/stalwart/data 0777 kiskaadee users -" + "d /home/kiskaadee/Core/config/stalwart/etc 0777 kiskaadee users -" + ]; + + # Open ports in the firewall for Traefik, Gitea SSH, GitOps Webhook Receiver, and Mail (SMTP, Submission, SMTPS, IMAPS, ManageSieve) + networking.firewall.allowedTCPPorts = [ 80 443 2223 9000 25 465 587 993 4190 ]; }