diff --git a/nixos/modules/services/video/frigate.nix b/nixos/modules/services/video/frigate.nix index 6e8f78029a5a5..1f4a6ee96cba9 100644 --- a/nixos/modules/services/video/frigate.nix +++ b/nixos/modules/services/video/frigate.nix @@ -10,6 +10,7 @@ let attrValues hasPrefix makeLibraryPath + match mkDefault mkEnableOption mkPackageOption @@ -104,6 +105,10 @@ let withCoralUSB = any (d: d.type == "edgetpu" && hasPrefix "usb" d.device or "") detectors; withCoralPCI = any (d: d.type == "edgetpu" && hasPrefix "pci" d.device or "") detectors; withCoral = withCoralPCI || withCoralUSB; + + # Provide ffmpeg-full for NVIDIA hardware acceleration + ffmpegArgs = cfg.settings.ffmpeg.hwaccel_args or ""; + ffmpeg' = if match "/nvidia/" ffmpegArgs != null then pkgs.ffmpeg-full else pkgs.ffmpeg-headless; in { @@ -540,7 +545,7 @@ in path = with pkgs; [ # unfree: # config.boot.kernelPackages.nvidiaPackages.latest.bin - ffmpeg-headless + ffmpeg' libva-utils procps radeontop