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;