1{
2 config,
3 lib,
4 pkgs,
5 ...
6}:
7
8let
9 cfg = config.hardware.decklink;
10 kernelPackages = config.boot.kernelPackages;
11in
12{
13 options.hardware.decklink.enable = lib.mkEnableOption "hardware support for the Blackmagic Design Decklink audio/video interfaces";
14
15 config = lib.mkIf cfg.enable {
16 # snd_blackmagic-io can cause issues with pipewire,
17 # so we do not enable it by default
18 boot.kernelModules = [
19 "blackmagic"
20 "blackmagic-io"
21 ];
22 boot.extraModulePackages = [ kernelPackages.decklink ];
23 systemd.packages = [ pkgs.blackmagic-desktop-video ];
24 systemd.services.DesktopVideoHelper.wantedBy = [ "multi-user.target" ];
25 };
26}