Files
nix/hosts/common/configs/user/gui/obs/default.nix
2025-05-20 09:38:53 +01:00

21 lines
516 B
Nix

{
user ? throw "user argument is required",
home ? throw "home argument is required",
}:
{ config, ... }:
{
boot = {
kernelModules = [ "v4l2loopback" ];
extraModulePackages = [ config.boot.kernelPackages.v4l2loopback ];
extraModprobeConfig = ''
options v4l2loopback devices=1 video_nr=1 card_label="OBS Cam" exclusive_caps=1
'';
};
environment.persistence = {
"/persist"."${home}/.config/obs-studio" = { };
};
home-manager.users.${user}.programs.obs-studio.enable = true;
}