summary refs log tree commit diff
path: root/nixos/modules/hardware/decklink.nix
blob: d179e1d7634ffb28efc3b36e50ca88d3198bdc73 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{ config, lib, pkgs, ... }:

let
  cfg = config.hardware.decklink;
  kernelPackages = config.boot.kernelPackages;
in
{
  options.hardware.decklink.enable = lib.mkEnableOption "hardware support for the Blackmagic Design Decklink audio/video interfaces";

  config = lib.mkIf cfg.enable {
    boot.kernelModules = [ "blackmagic" "blackmagic-io" "snd_blackmagic-io" ];
    boot.extraModulePackages = [ kernelPackages.decklink ];
    systemd.packages = [ pkgs.blackmagic-desktop-video ];
    systemd.services.DesktopVideoHelper.wantedBy = [ "multi-user.target" ];
  };
}