From 10183441d061a972f33975746fc78f49d439eaa6 Mon Sep 17 00:00:00 2001 From: Nicolas Dumazet Date: Tue, 17 Mar 2026 21:27:53 +0100 Subject: [PATCH] nixos/grocy: enforce data directory presence In the case of mounted directories, systemd needs to know that this script depends on this path to add the adequate dependency. --- nixos/modules/services/web-apps/grocy.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nixos/modules/services/web-apps/grocy.nix b/nixos/modules/services/web-apps/grocy.nix index d6095b50fa8a..8106cc06fd2b 100644 --- a/nixos/modules/services/web-apps/grocy.nix +++ b/nixos/modules/services/web-apps/grocy.nix @@ -216,6 +216,7 @@ in systemd.services.grocy-setup = { wantedBy = [ "multi-user.target" ]; before = [ "phpfpm-grocy.service" ]; + unitConfig.RequiresMountsFor = [ cfg.dataDir ]; script = '' rm -rf ${cfg.dataDir}/viewcache/* '';