-
Notifications
You must be signed in to change notification settings - Fork 0
/
pipewire.nix
67 lines (63 loc) · 2.04 KB
/
pipewire.nix
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
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.profiles.pipewire;
in
{
options.profiles.pipewire.enable = mkEnableOption "Enable the PipeWire audio/video daemon instead of PulseAudio";
options.profiles.pipewire.lowlatency.enable = mkEnableOption "Enable low-latency audio configuration for PipeWire";
config = mkMerge [
(mkIf cfg.enable {
environment.systemPackages = with pkgs; [
# needed for pactl utility some apps might rely on
pulseaudio
# patchbay
helvum
# sound effects
easyeffects
];
# https://nixos.wiki/wiki/PipeWire
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
#config.pipewire = {
# "context.properties" = {
# #"link.max-buffers" = 64;
# "link.max-buffers" = 16; # version < 3 clients can't handle more than this
# "log.level" = 2; # https://docs.pipewire.org/page_daemon.html
# #"default.clock.rate" = 48000;
# #"default.clock.quantum" = 1024;
# #"default.clock.min-quantum" = 32;
# #"default.clock.max-quantum" = 8192;
# #
# };
# "context.objects" = [
# {
# # A default dummy driver. This handles nodes marked with the "node.always-driver"
# # property when no other driver is currently active. JACK clients need this.
# factory = "spa-node-factory";
# args = {
# "factory.name" = "support.node.driver";
# "node.name" = "Dummy-Driver";
# "priority.driver" = 8000;
# };
# }
# ];
#};
};
})
(mkIf (!cfg.enable) {
sound.enable = true;
hardware.pulseaudio = {
enable = true;
package = pkgs.pulseaudioFull;
support32Bit = true;
};
})
];
}