about summary refs log tree commit diff
path: root/ops/nixos/modules/v4l2loopback.nix
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2020-04-04T01·31+0100
committerVincent Ambo <tazjin@google.com>2020-04-04T01·36+0100
commitd2d7385833db890414519ee329847af38df12ffc (patch)
tree57ed1c23e371c7f68d7d5870b56ec94ffe54e6a2 /ops/nixos/modules/v4l2loopback.nix
parent0473307f8763c60e88948bed5313affa1aabdfba (diff)
feat(ops/nixos/nugget): Add module for v4l2loopback support r/615
This kernel module creates a fake video input device to which I can
stream various things, such as screen grabs or qyliss' video stream
for TVL.
Diffstat (limited to 'ops/nixos/modules/v4l2loopback.nix')
-rw-r--r--ops/nixos/modules/v4l2loopback.nix12
1 files changed, 12 insertions, 0 deletions
diff --git a/ops/nixos/modules/v4l2loopback.nix b/ops/nixos/modules/v4l2loopback.nix
new file mode 100644
index 000000000000..636b2ff6cf27
--- /dev/null
+++ b/ops/nixos/modules/v4l2loopback.nix
@@ -0,0 +1,12 @@
+{ config, lib, pkgs, ... }:
+
+{
+  boot = {
+    extraModulePackages = [ config.boot.kernelPackages.v4l2loopback ];
+    kernelModules = [ "v4l2loopback" ];
+    extraModprobeConfig = ''
+      options v4l2loopback exclusive_caps=1
+    '';
+  };
+}
+