From 122929cda74f92555c40e9888c968e02611cb3e8 Mon Sep 17 00:00:00 2001 From: Nikolay Amiantov Date: Sat, 9 Jan 2016 04:15:25 +0300 Subject: [PATCH] nixos/dovecot: use systemd's RuntimeDirectory instead of creating it by ourselves --- nixos/modules/services/mail/dovecot.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/nixos/modules/services/mail/dovecot.nix b/nixos/modules/services/mail/dovecot.nix index ae9de6445906..c9406a2ac516 100644 --- a/nixos/modules/services/mail/dovecot.nix +++ b/nixos/modules/services/mail/dovecot.nix @@ -203,8 +203,6 @@ in wantedBy = [ "multi-user.target" ]; preStart = '' - mkdir -p "${baseDir}/login" - chown -R ${cfg.user}:${cfg.group} "${baseDir}" rm -f "${stateDir}/modules" ln -s "${modulesDir}" "${stateDir}/modules" ''; @@ -215,6 +213,7 @@ in Restart = "on-failure"; RestartSec = "1s"; StartLimitInterval = "1min"; + RuntimeDirectory = [ "dovecot2" ]; }; };