infra/nix/os/snippets/obs-studio.nix

27 lines
820 B
Nix

{ config, ... }:
let
# TODO: make configurable
homeUser = "steveej";
in
{
boot.extraModulePackages = [ config.boot.kernelPackages.v4l2loopback.out ];
# Activate kernel modules (choose from built-ins and extra ones)
boot.kernelModules = [
# Virtual Camera
"v4l2loopback"
# Virtual Microphone, built-in
"snd-aloop"
];
# exclusive_caps: Skype, Zoom, Teams etc. will only show device when actually streaming
# card_label: Name of virtual camera, how it'll show up in Skype, Zoom, Teams
# https://github.com/umlaeute/v4l2loopback
boot.extraModprobeConfig = ''
options v4l2loopback devices=1 video_nr=1 card_label="OBSCam" exclusive_caps=1
'';
security.polkit.enable = true;
home-manager.users.${homeUser} = _: { imports = [ ../../home-manager/programs/obs-studio.nix ]; };
}