summaryrefslogtreecommitdiff
path: root/hm/soft/obs.nix
blob: 235187ccc7e4566f1b09ac0403e9a9fc99e84d7a (plain)
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
26
{
  config,
  lib,
  pkgs,
  ...
}:
let
  cfg = config.hm.soft.obs;
in
{
  options.hm.soft.obs.enable = lib.mkEnableOption "enables obs video recording and clipping";
  config = lib.mkIf cfg.enable {
    programs.obs-studio = {
      enable = true;
      plugins = with pkgs.obs-studio-plugins; [
        obs-pipewire-audio-capture
      ];
    };

    home.packages = [ pkgs.obs-cmd ];

    home.sessionVariables = {
      OBS_WEBSOCKET_URL = "/run/secrets/obs/password";
    };
  };
}