about summary refs log tree commit diff
path: root/nixos/alpha/config/pipewire.nix
blob: d1ec56fcddda920bfa36697d616e8a3293416af6 (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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
{
  pipewire."context.properties" = {
    "core.daemon" = true;
    "core.name" = "pipewire-0";
    "link.max-buffers" = 16;
    "log.level" = 2;
    "default.clock.rate" = 48000;
    "default.clock.quantum" = 32;
    "default.clock.min-quantum" = 32;
    "default.clock.max-quantum" = 32;
  };

  pipewire-pulse = {
    "context.modules" = [
      { name = "libpipewire-module-protocol-native"; }
      { name = "libpipewire-module-client-node"; }
      { name = "libpipewire-module-adapter"; }
      { name = "libpipewire-module-metadata"; }
      { name = "libpipewire-module-profiler"; }
      { name = "libpipewire-module-spa-device-factory"; }
      { name = "libpipewire-module-spa-node-factory"; }
      { name = "libpipewire-module-client-device"; }
      { name = "libpipewire-module-link-factory"; }
      { name = "libpipewire-module-session-manager"; }

      {
        name = "libpipewire-module-portal";
        flags = [ "ifexists" "nofail" ];
      }

      {
        name = "libpipewire-module-access";
        args = { };
      }

      {
        name = "libpipewire-module-rtkit";

        args = {
          "nice.level" = -15;
          "rt.prio" = 90;
          "rt.time.soft" = 200000;
          "rt.time.hard" = 200000;
        };

        flags = [ "ifexists" "nofail" ];
      }

      {
        name = "libpipewire-module-protocol-pulse";
        args = {
          "server.address" = [ "unix:native" ];
          "pulse.min.req" = "32/48000";
          "pulse.min.quantum" = "32/48000";
          "pulse.min.frag" = "32/48000";
          "pulse.default.req" = "2048/48000";
          "pulse.default.frag" = "2048/48000";
        };
      }
    ];

    "stream.properties" = {
      "node.latency" = "32/48000";
      "resample.quality" = 1;
    };
  };
}