DEVELOPMENT ENVIRONMENT

~liljamo/nix-arta

ref: 79860290dcc0a4d3071162358c7a0f47ea533f77 nix-arta/roles/obs.nix -rw-r--r-- 553 bytes
79860290Jonni Liljamo feat(systems/hosts/proxy): remove old registry entry a month ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
{
  config,
  lib,
  ...
}: let
  cfg = config.roles.obs;
in {
  options.roles.obs = {
    enable = lib.mkEnableOption "OBS Studio";
    enableVirtualCamera = lib.mkEnableOption "OBS virtual camera"; # TODO: implement lol
  };

  config = lib.mkIf cfg.enable {
    hm.programs.obs-studio = {
      enable = true;
    };

    boot.extraModulePackages = [
      config.boot.kernelPackages.v4l2loopback
    ];
    boot.extraModprobeConfig = ''
      options v4l2loopback devices=1 video_nr=1 card_label="OBS virtual camera" exclusive_caps=1
    '';
  };
}