DEVELOPMENT ENVIRONMENT

~liljamo/nix-arta

ref: 9e5033e54247224b8162cd1b97eefdf2a2a0b0e1 nix-arta/roles/obs.nix -rw-r--r-- 553 bytes
9e5033e5Jonni Liljamo feat: pass lib to artautil, rename hostnameToIPv4 2 months 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
    '';
  };
}