diff --git a/nixos/modules/services/mail/stalwart-mail.nix b/nixos/modules/services/mail/stalwart-mail.nix index d4e650de07db6..849661646977b 100644 --- a/nixos/modules/services/mail/stalwart-mail.nix +++ b/nixos/modules/services/mail/stalwart-mail.nix @@ -119,6 +119,10 @@ in }; }; + systemd.tmpfiles.rules = [ + "d '${cfg.dataDir}' - stalwart-mail stalwart-mail - -" + ]; + systemd = { packages = [ cfg.package ]; services.stalwart-mail = { @@ -147,6 +151,9 @@ in StandardOutput = "journal"; StandardError = "journal"; + ReadWritePaths = [ + cfg.dataDir + ]; CacheDirectory = "stalwart-mail"; StateDirectory = "stalwart-mail";