Use upstreamed pcie coral and vaapi frigate configuration
All checks were successful
Check Flake / check-flake (push) Successful in 12m12s
All checks were successful
Check Flake / check-flake (push) Successful in 12m12s
This commit is contained in:
parent
af9e462b27
commit
f4e40955c8
@ -136,37 +136,16 @@ lib.mkMerge [
|
|||||||
}
|
}
|
||||||
{
|
{
|
||||||
# hardware encode/decode with amdgpu vaapi
|
# hardware encode/decode with amdgpu vaapi
|
||||||
systemd.services.frigate = {
|
services.frigate.vaapiDriver = "radeonsi";
|
||||||
environment.LIBVA_DRIVER_NAME = "radeonsi";
|
|
||||||
serviceConfig = {
|
|
||||||
SupplementaryGroups = [ "render" "video" ]; # for access to dev/dri/*
|
|
||||||
AmbientCapabilities = "CAP_PERFMON";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
services.frigate.settings.ffmpeg.hwaccel_args = "preset-vaapi";
|
services.frigate.settings.ffmpeg.hwaccel_args = "preset-vaapi";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
# Coral TPU for frigate
|
# Coral TPU for frigate
|
||||||
services.udev.packages = [ pkgs.libedgetpu ];
|
|
||||||
users.groups.apex = { };
|
|
||||||
systemd.services.frigate.environment.LD_LIBRARY_PATH = "${pkgs.libedgetpu}/lib";
|
|
||||||
systemd.services.frigate.serviceConfig.SupplementaryGroups = [ "apex" ];
|
|
||||||
|
|
||||||
# Coral PCIe driver
|
|
||||||
boot.extraModulePackages = with config.boot.kernelPackages; [ gasket ];
|
|
||||||
services.udev.extraRules = ''
|
|
||||||
SUBSYSTEM=="apex", MODE="0660", GROUP="apex"
|
|
||||||
'';
|
|
||||||
|
|
||||||
services.frigate.settings.detectors.coral = {
|
services.frigate.settings.detectors.coral = {
|
||||||
type = "edgetpu";
|
type = "edgetpu";
|
||||||
device = "pci";
|
device = "pci";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
{
|
|
||||||
# Fix bug in nixos module where cache is not cleared when starting the service because "rm" cannot be found
|
|
||||||
systemd.services.frigate.serviceConfig.ExecStartPre = lib.mkForce "${pkgs.bash}/bin/sh -c 'rm -f /var/cache/frigate/*.mp4'";
|
|
||||||
}
|
|
||||||
{
|
{
|
||||||
# Don't require authentication for frigate
|
# Don't require authentication for frigate
|
||||||
# This is ok because the reverse proxy already requires tailscale access anyway
|
# This is ok because the reverse proxy already requires tailscale access anyway
|
||||||
|
Loading…
x
Reference in New Issue
Block a user