34 lines
713 B
Nix
34 lines
713 B
Nix
|
{
|
||
|
config,
|
||
|
lib,
|
||
|
pkgs,
|
||
|
...
|
||
|
}: let
|
||
|
cfg = config.jade.media.obs;
|
||
|
in
|
||
|
with lib; {
|
||
|
options.jade.desktop.media.obs = mkEnableOption "Enable OBS";
|
||
|
|
||
|
config = mkIf cfg.enable {
|
||
|
# OBS stuffs
|
||
|
environment.systemPackages = [
|
||
|
(pkgs.wrapOBS {
|
||
|
plugins = with pkgs.obs-studio-plugins; [
|
||
|
wlrobs
|
||
|
obs-backgroundremoval
|
||
|
obs-pipewire-audio-capture
|
||
|
];
|
||
|
})
|
||
|
];
|
||
|
|
||
|
boot = {
|
||
|
extraModulePackages = with config.boot.kernelPackages; [
|
||
|
v4l2loopback
|
||
|
];
|
||
|
extraModprobeConfig = ''
|
||
|
options v4l2loopback devices=1 video_nr=1 card_label="OBS Cam" exclusive_caps=1
|
||
|
'';
|
||
|
};
|
||
|
};
|
||
|
}
|