summaryrefslogtreecommitdiffstats
path: root/nixos/tests/obs-studio.nix
blob: 7290119a12d739a21f7f6c7eab93ade31b774363 (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
27
28
29
30
31
32
33
34
35
36
37
38
{ ... }:

{
  name = "obs-studio";

  nodes.machine =
    { pkgs, ... }:
    {
      imports = [
        ./common/x11.nix
        ./common/user-account.nix
      ];

      programs.obs-studio = {
        enable = true;
        plugins = with pkgs.obs-studio-plugins; [
          wlrobs
          obs-vkcapture
        ];
        enableVirtualCamera = true;
      };
    };

  testScript = ''
    machine.wait_for_x()
    machine.succeed("obs --version")

    # virtual camera tests
    machine.succeed("lsmod | grep v4l2loopback")
    machine.succeed("ls /dev/video1")
    machine.succeed("obs --startvirtualcam >&2 &")
    machine.wait_for_window("OBS")
    machine.sleep(5)

    # test plugins
    machine.succeed("which obs-vkcapture")
  '';
}