From 15db31b2d9b113dae91768637152407de3537f66 Mon Sep 17 00:00:00 2001 From: hexchen Date: Mon, 2 Nov 2020 19:26:11 +0000 Subject: [PATCH] nixos/decklink: init --- nixos/modules/hardware/decklink.nix | 16 ++++++++++++++++ nixos/modules/module-list.nix | 1 + 2 files changed, 17 insertions(+) create mode 100644 nixos/modules/hardware/decklink.nix diff --git a/nixos/modules/hardware/decklink.nix b/nixos/modules/hardware/decklink.nix new file mode 100644 index 000000000000..d179e1d7634f --- /dev/null +++ b/nixos/modules/hardware/decklink.nix @@ -0,0 +1,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" ]; + }; +} diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 58987313a0a2..018b9b6b44c5 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -55,6 +55,7 @@ ./hardware/cpu/amd-sev.nix ./hardware/cpu/intel-microcode.nix ./hardware/cpu/intel-sgx.nix + ./hardware/decklink.nix ./hardware/device-tree.nix ./hardware/digitalbitbox.nix ./hardware/flipperzero.nix