fix frigate

This commit is contained in:
2025-12-01 23:29:07 +00:00
parent 44626b5960
commit 88ae22777a
2 changed files with 19 additions and 1 deletions

View File

@@ -96,7 +96,12 @@ in
coral.usb.enable = true; coral.usb.enable = true;
graphics = { graphics = {
enable = true; enable = true;
extraPackages = [ pkgs.intel-media-driver ]; # AMD GPU VAAPI support
extraPackages = with pkgs; [
mesa # AMD GPU drivers (includes RADV)
libva-vdpau-driver # VAAPI for AMD (formerly vaapiVdpau)
libvdpau-va-gl # VDPAU to VA-GL bridge
];
}; };
}; };

View File

@@ -54,10 +54,22 @@ in
}; };
go2rtc = { go2rtc = {
preStart = "ln -sf $CREDENTIALS_DIRECTORY/secrets.env /run/go2rtc/secrets.env"; preStart = "ln -sf $CREDENTIALS_DIRECTORY/secrets.env /run/go2rtc/secrets.env";
environment = {
# Set HOME so Mesa can find cache directory
HOME = "/var/cache/go2rtc";
# Force AMD VAAPI driver
LIBVA_DRIVER_NAME = "radeonsi";
};
serviceConfig = { serviceConfig = {
EnvironmentFile = [ "-/run/go2rtc/secrets.env" ]; EnvironmentFile = [ "-/run/go2rtc/secrets.env" ];
RuntimeDirectory = "go2rtc"; RuntimeDirectory = "go2rtc";
CacheDirectory = "go2rtc"; # Mesa shader cache at /var/cache/go2rtc
LoadCredential = [ "secrets.env:${cfg.secretsEnv}" ]; LoadCredential = [ "secrets.env:${cfg.secretsEnv}" ];
# Ensure access to GPU devices
SupplementaryGroups = [
"render"
"video"
];
}; };
}; };
}; };
@@ -100,6 +112,7 @@ in
services.frigate = { services.frigate = {
enable = true; enable = true;
hostname = "r1.jakstys.lt"; hostname = "r1.jakstys.lt";
vaapiDriver = "radeonsi"; # AMD GPU VAAPI driver
settings = { settings = {
#ui.strftime_fmt = "%F %T"; #ui.strftime_fmt = "%F %T";
# Pin to FFmpeg 7 due to FFmpeg 8 RTSP issues in NixOS 25.11 # Pin to FFmpeg 7 due to FFmpeg 8 RTSP issues in NixOS 25.11