From a60a5613012c87752da7ed5d4702dba60dc5e8b7 Mon Sep 17 00:00:00 2001 From: Schrottkatze Date: Thu, 3 Oct 2024 01:52:00 +0200 Subject: [PATCH] obs virtualcam --- modules/desktop/default.nix | 1 + modules/desktop/obs.nix | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 modules/desktop/obs.nix diff --git a/modules/desktop/default.nix b/modules/desktop/default.nix index 56fb870..63f0143 100644 --- a/modules/desktop/default.nix +++ b/modules/desktop/default.nix @@ -28,6 +28,7 @@ in ./fonts.nix ./firefox.nix ./x.nix + ./obs.nix ]; programs.seahorse.enable = true; diff --git a/modules/desktop/obs.nix b/modules/desktop/obs.nix new file mode 100644 index 0000000..921d67e --- /dev/null +++ b/modules/desktop/obs.nix @@ -0,0 +1,23 @@ +{ + pkgs, + config, + ... +}: { + environment.systemPackages = [ + (pkgs.wrapOBS { + plugins = with pkgs.obs-studio-plugins; [ + wlrobs + obs-backgroundremoval + obs-pipewire-audio-capture + ]; + }) + ]; + + boot.extraModulePackages = with config.boot.kernelPackages; [ + v4l2loopback + ]; + boot.extraModprobeConfig = '' + options v4l2loopback devices=1 video_nr=1 card_label="OBS Cam" exclusive_caps=1 + ''; + security.polkit.enable = true; +}