From 1168ec307c4b6327e60004e5e9154af2ad716787 Mon Sep 17 00:00:00 2001 From: h7x4 Date: Thu, 30 Oct 2025 13:54:55 +0900 Subject: [PATCH] nixos/sogo: replace systemd `preStart` with `ExecStartPre` for tmp watcher --- nixos/modules/services/web-apps/sogo.nix | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/nixos/modules/services/web-apps/sogo.nix b/nixos/modules/services/web-apps/sogo.nix index f5123abd7443..e268e3ec4a3b 100644 --- a/nixos/modules/services/web-apps/sogo.nix +++ b/nixos/modules/services/web-apps/sogo.nix @@ -151,16 +151,15 @@ in description = "SOGo tmpwatch"; startAt = [ "hourly" ]; - script = '' - SOGOSPOOL=/var/lib/sogo/spool - - find "$SOGOSPOOL" -type f -user sogo -atime +23 -delete > /dev/null - find "$SOGOSPOOL" -mindepth 1 -type d -user sogo -empty -delete > /dev/null - ''; serviceConfig = { Type = "oneshot"; + ExecStart = [ + "find /var/lib/sogo/spool -type f -user sogo -atime +23 -delete" + "find /var/lib/sogo/spool -mindepth 1 -type d -user sogo -empty -delete" + ]; + ProtectSystem = "strict"; ProtectHome = true; PrivateTmp = true;