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 <[email protected]>
  • Loading branch information
mweinelt and JManch committed Nov 21, 2024
1 parent 0b354f2 commit a26fd14
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 --force /var/cache/frigate/*.mp4
'';
ExecStart = "${cfg.package.python.interpreter} -m frigate";
Restart = "on-failure";
SyslogIdentifier = "frigate";
Expand Down

0 comments on commit a26fd14

Please sign in to comment.