nixos/modules/desktop/apps/obs/default.nix

32 lines
636 B
Nix
Raw Normal View History

2023-08-06 21:19:35 +04:00
{
outputs,
options,
config,
lib,
pkgs,
...
}:
2024-08-01 16:24:09 +04:00
let
2023-08-06 21:19:35 +04:00
cfg = config.modules.desktop.apps.obs;
in {
options.modules.desktop.apps.obs = {
2024-08-01 16:24:09 +04:00
enable = lib.mkEnableOption false;
2023-08-06 21:19:35 +04:00
};
2024-08-01 16:24:09 +04:00
config = lib.mkIf cfg.enable {
2023-08-06 21:19:35 +04:00
users.users.sako.packages = with pkgs; [
obs-studio
];
2024-09-08 12:07:59 +04:00
# OBS Virtual camera support
boot.extraModulePackages = with config.boot.kernelPackages; [
v4l2loopback
];
boot.kernelModules = [ "v4l2loopback" ];
boot.extraModprobeConfig = ''
options v4l2loopback devices=1 video_nr=1 card_label="OBS Cam" exclusive_caps=1
'';
security.polkit.enable = true;
2023-08-06 21:19:35 +04:00
};
}