Skip to content

Commit

Permalink
nixos/frigate: use shellscript to clear frigate cache
Browse files Browse the repository at this point in the history
Shell expansions apparently do not work correctly in systemd command
lines.

Co-Authored-By: Joshua Manchester <JManch@protonmail.com>
  • Loading branch information
mweinelt and JManch committed Nov 22, 2024
1 parent a810c07 commit 2b56a91
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion nixos/modules/services/video/frigate.nix
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,9 @@ in
intel-gpu-tools
];
serviceConfig = {
ExecStartPre = "-rm /var/cache/frigate/*.mp4";
ExecStartPre = pkgs.writeShellScript "frigate-clear-cache" ''
rm --recursive --force /var/cache/frigate/*
'';
ExecStart = "${cfg.package.python.interpreter} -m frigate";
Restart = "on-failure";
SyslogIdentifier = "frigate";
Expand Down

0 comments on commit 2b56a91

Please sign in to comment.