From 6bd22c5f48b7e84dc09a9bd1cb99b736f1aaf218 Mon Sep 17 00:00:00 2001 From: Sakooooo <78461130+Sakooooo@users.noreply.github.com> Date: Sun, 8 Sep 2024 12:07:59 +0400 Subject: [PATCH] add obs virtual camera support --- modules/desktop/apps/obs/default.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/modules/desktop/apps/obs/default.nix b/modules/desktop/apps/obs/default.nix index f0c791dd..cb0faf1c 100644 --- a/modules/desktop/apps/obs/default.nix +++ b/modules/desktop/apps/obs/default.nix @@ -17,5 +17,15 @@ in { users.users.sako.packages = with pkgs; [ obs-studio ]; + + # OBS Virtual camera support + boot.extraModulePackages = with config.boot.kernelPackages; [ + v4l2loopback + ]; + boot.kernelModules = [ "v4l2loopback" ]; + boot.extraModprobeConfig = '' + options v4l2loopback devices=1 video_nr=1 card_label="OBS Cam" exclusive_caps=1 + ''; + security.polkit.enable = true; }; }