summary refs log tree commit diff
path: root/nixos/modules/services/mail
diff options
context:
space:
mode:
authorBruno Inec <contact@sweenu.xyz>2023-01-06 15:37:44 +0100
committerBruno Inec <contact@sweenu.xyz>2023-01-20 00:39:32 +0100
commit8f10857af43c0f43fa1c64aa19add3e509ad7734 (patch)
tree7f200106e7d7407b9409662afabb60e312fbe8d1 /nixos/modules/services/mail
parent988feead01eb2766dbd65c5b7996f8e3d9034eb7 (diff)
downloadnixpkgs-8f10857af43c0f43fa1c64aa19add3e509ad7734.tar
nixpkgs-8f10857af43c0f43fa1c64aa19add3e509ad7734.tar.gz
nixpkgs-8f10857af43c0f43fa1c64aa19add3e509ad7734.tar.bz2
nixpkgs-8f10857af43c0f43fa1c64aa19add3e509ad7734.tar.lz
nixpkgs-8f10857af43c0f43fa1c64aa19add3e509ad7734.tar.xz
nixpkgs-8f10857af43c0f43fa1c64aa19add3e509ad7734.tar.zst
nixpkgs-8f10857af43c0f43fa1c64aa19add3e509ad7734.zip
let systemd handle /var/lib/goeland creation
Diffstat (limited to 'nixos/modules/services/mail')
-rw-r--r--nixos/modules/services/mail/goeland.nix5
1 files changed, 3 insertions, 2 deletions
diff --git a/nixos/modules/services/mail/goeland.nix b/nixos/modules/services/mail/goeland.nix
index aeeee97ea41..e4a32de1dc3 100644
--- a/nixos/modules/services/mail/goeland.nix
+++ b/nixos/modules/services/mail/goeland.nix
@@ -34,14 +34,15 @@ in
   };
 
   config = mkIf cfg.enable {
-    systemd.tmpfiles.rules = [ "d ${cfg.databaseDirectory} 0750 goeland goeland -" ];
-
     services.goeland.settings.database = "${cfg.databaseDirectory}/goeland.db";
 
     systemd.services.goeland = {
       serviceConfig = let confFile = tomlFormat.generate "config.toml" cfg.settings; in {
         ExecStart = "${pkgs.goeland}/bin/goeland run -c ${confFile}";
         User = "goeland";
+        Group = "goeland";
+        StateDirectory = "goeland";
+        StateDirectoryMode = "0750";
       };
       startAt = cfg.schedule;
     };