Unverified Commit cb4fd4e3 authored by Martin Weinelt's avatar Martin Weinelt
Browse files

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
parent 4ba0ebe9
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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