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

28 lines
820 B
Nix
Raw Normal View History

2024-11-15 10:17:56 +01:00
{ config, ... }:
let
2024-10-08 23:46:08 +02:00
# TODO: make configurable
homeUser = "steveej";
2024-11-15 10:17:56 +01:00
in
{
boot.extraModulePackages = [ config.boot.kernelPackages.v4l2loopback.out ];
2024-10-08 23:46:08 +02:00
# 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;
2024-11-15 10:17:56 +01:00
home-manager.users.${homeUser} = _: { imports = [ ../../home-manager/programs/obs-studio.nix ]; };
2024-10-08 23:46:08 +02:00
}