From d2d7385833db890414519ee329847af38df12ffc Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Sat, 4 Apr 2020 02:31:00 +0100 Subject: feat(ops/nixos/nugget): Add module for v4l2loopback support 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. --- ops/nixos/modules/v4l2loopback.nix | 12 ++++++++++++ ops/nixos/nugget/default.nix | 1 + 2 files changed, 13 insertions(+) create mode 100644 ops/nixos/modules/v4l2loopback.nix (limited to 'ops') 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 + ''; + }; +} + diff --git a/ops/nixos/nugget/default.nix b/ops/nixos/nugget/default.nix index 6d8c67cca247..e774eb64f413 100644 --- a/ops/nixos/nugget/default.nix +++ b/ops/nixos/nugget/default.nix @@ -16,6 +16,7 @@ config: let in depot.lib.fix(self: { imports = [ ../modules/tailscale.nix + ../modules/v4l2loopback.nix ]; hardware = { -- cgit 1.4.1