about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorhexchen <hexchen@lilwit.ch>2020-11-02 19:26:11 +0000
committerJörg Thalheim <Mic92@users.noreply.github.com>2023-09-09 19:45:50 +0200
commit15db31b2d9b113dae91768637152407de3537f66 (patch)
tree0733fc848d439b6e3ec7dbdb9fd60978dc487a0e /nixos
parent517cf05cd73e7ee399ac49e55c1049167af978ee (diff)
nixos/decklink: init
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/hardware/decklink.nix16
-rw-r--r--nixos/modules/module-list.nix1
2 files changed, 17 insertions, 0 deletions
diff --git a/nixos/modules/hardware/decklink.nix b/nixos/modules/hardware/decklink.nix
new file mode 100644
index 0000000000000..d179e1d7634ff
--- /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 58987313a0a2b..018b9b6b44c52 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