Commit Graph

20 Commits

Author SHA1 Message Date
Martin Weinelt
1c07d92099
nixos/frigate: allow configuring a libva driver
In my testing this helped steer VA-API towards the correct card and also
made it show GPU statistics in performance monitoring.
2024-11-22 17:59:37 +01:00
Martin Weinelt
7411b85629
nixos/frigate: allow GPU use for video acceleration
The `render` group is required to acces the graphic cards decoding,
encoding and transcoding capabilities.

It is required for using fancy `ffmpeg.hwaccel-args` values, like
`preset-vaapi`.
2024-11-22 17:59:36 +01:00
Martin Weinelt
2b56a916ca
nixos/frigate: use shellscript to clear frigate cache
Shell expansions apparently do not work correctly in systemd command
lines.

Co-Authored-By: Joshua Manchester <JManch@protonmail.com>
2024-11-22 17:59:36 +01:00
Martin Weinelt
a810c07ff2
nixos/frigate: inherit required functions from lib 2024-11-22 17:59:36 +01:00
Martin Weinelt
7e33e470df
nixos/frigate: provide ffmpeg-full for nvidia hw accel
Closes: #344114
2024-11-22 17:59:35 +01:00
Martin Weinelt
d31bf00e2b
nixos/frigate: stop enabling recommendedProxySettings globally
Closes: #320512
2024-11-22 17:59:35 +01:00
Martin Weinelt
b96c4a67b9
nixos/frigate: add support for Coral devices 2024-11-22 17:59:35 +01:00
Andrew Marshall
dac96aac49 nixos/frigate: Set SyslogIdentifier for better log entries
Systemd defaults to the name of the exec-ed process, which in this case
is python. That's not so helpful when looking through syslog, so adjust
accordingly.
2024-11-10 17:49:20 -05:00
Martin Weinelt
7440feefd9
nixos/frigate: Clear cache directory before start (#337520) 2024-10-29 01:25:30 +01:00
Artturin
e0464e4788 treewide: replace stdenv.is with stdenv.hostPlatform.is
In preparation for the deprecation of `stdenv.isX`.

These shorthands are not conducive to cross-compilation because they
hide the platforms.

Darwin might get cross-compilation for which the continued usage of `stdenv.isDarwin` will get in the way

One example of why this is bad and especially affects compiler packages
https://www.github.com/NixOS/nixpkgs/pull/343059

There are too many files to go through manually but a treewide should
get users thinking when they see a `hostPlatform.isX` in a place where it
doesn't make sense.

```
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv.is" "stdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv'.is" "stdenv'.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "clangStdenv.is" "clangStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "gccStdenv.is" "gccStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenvNoCC.is" "stdenvNoCC.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "inherit (stdenv) is" "inherit (stdenv.hostPlatform) is"
fd --type f "\.nix" | xargs sd --fixed-strings "buildStdenv.is" "buildStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "effectiveStdenv.is" "effectiveStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "originalStdenv.is" "originalStdenv.hostPlatform.is"
```
2024-09-25 00:04:37 +03:00
Martin Weinelt
62a52a1b3c
frigate: 0.13.2 -> 0.14.1
https://github.com/blakeblackshear/frigate/releases/tag/v0.14.0
https://github.com/blakeblackshear/frigate/releases/tag/v0.14.1
2024-08-31 13:49:32 +02:00
fleaz
d594ccbfd3
nixos/frigate: Clear cache directory before start
Frigate can't handle old files in the cache directory and then behaves
strange. The official setup guide also starts every time with a clean
cache directory.
2024-08-26 19:57:13 +02:00
Emily
b801dc2813 nixos/frigate: unpin ffmpeg_5
It just uses the command‐line tool, and the test passes.
2024-07-14 08:34:23 +01:00
Vladimir Timofeenko
f41e387c26
nixos/frigate: drop BindPaths from systemd service (#309341)
Migrations have been working well even with misconfigured BindPaths => removing
2024-05-24 18:24:56 +02:00
stuebinm
6afb255d97 nixos: remove all uses of lib.mdDoc
these changes were generated with nixq 0.0.2, by running

  nixq ">> lib.mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix
  nixq ">> mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix
  nixq ">> Inherit >> mdDoc[remove]" --batchmode nixos/**.nix

two mentions of the mdDoc function remain in nixos/, both of which
are inside of comments.

Since lib.mdDoc is already defined as just id, this commit is a no-op as
far as Nix (and the built manual) is concerned.
2024-04-13 10:07:35 -07:00
fleaz
250078ceba
frigate: 0.12.1 -> 0.13.1
Changelog:
https://github.com/blakeblackshear/frigate/releases/tag/v0.13.0
https://github.com/blakeblackshear/frigate/releases/tag/v0.13.1

Co-Authored-By: Martin Weinelt <hexa@darmstadt.ccc.de>
2024-02-06 22:54:22 +01:00
Martin Weinelt
2f8686ce17
nixos/frigate: restart the service on failure
Closes: #266837
2023-12-26 22:33:19 +01:00
h7x4
0a37316d6c
treewide: use mkPackageOption
This commit replaces a lot of usages of `mkOption` with the package
type, to be `mkPackageOption`, in order to reduce the amount of code.
2023-11-27 01:28:36 +01:00
Martin Weinelt
3086313e4c
nixos/frigate: fix recording and serving of clips/recordings
Frigate does string prefix matching for paths, which isn't exactly
compatible with dynamically provisioned directories of systemd, where
/var/cache/frigate is actually a symlink to /var/cache/private/frigate.

Because we are unlikely to get this fixed upstream, this is one of the
reason we should stop using DynamicUser= here.

The other being, that nginx needs to be able to serve clips and
recordings from both the CacheDirectory and the StateDirectory, and
nginx being a member on a group that may only exist after it was started
up doesn't work reliably.

This is also why we relax the umask to allow g+r/g+rx for newly created
files. Existing installs may need the following permissions fix to get
things going.

```
find /var/lib/frigate/recordings -type d -exec chmod g+rx {} \;
find /var/lib/frigate/recordings -type f -exec chmod g+r {} \;
find /var/cache/frigate -type f -exec chmod g+r {} \;
```

Co-Authored-By: Daniel Barlow <dan@telent.net>
2023-07-27 18:36:25 +02:00
Martin Weinelt
f11d33afb7
nixos/frigate: init 2023-05-22 16:29:54 +02:00