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.
This commit is contained in:
Nicolas Dumazet
2026-03-21 10:27:34 +01:00
parent 922114cf0f
commit 10183441d0
@@ -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/*
'';