nixos/frigate: don't clear model cache

Upstream stores the model cache in the config directory, which is
unnecessarily messy. The cache directory is still the correct place for
these, since they can be pruned and redownloaded, we just don't want it
to happen on every restart.

Fixes: #427714
(cherry picked from commit cb4fd4e3ca)
This commit is contained in:
Martin Weinelt
2025-07-23 23:27:46 +02:00
committed by github-actions[bot]
parent e451f88d87
commit d3b13a2850

View File

@@ -632,7 +632,8 @@ in
serviceConfig = {
ExecStartPre = [
(pkgs.writeShellScript "frigate-clear-cache" ''
rm --recursive --force /var/cache/frigate/*
shopt -s extglob
rm --recursive --force /var/cache/frigate/!(model_cache)
'')
(pkgs.writeShellScript "frigate-create-writable-config" ''
cp --no-preserve=mode "${format.generate "frigate.yml" filteredConfig}" /run/frigate/frigate.yml