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
This commit is contained in:
Martin Weinelt
2025-07-23 23:27:46 +02:00
parent 4ba0ebe962
commit cb4fd4e3ca

View File

@@ -643,7 +643,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