1
Fork 0
nixos-system-config/modules/nixos/hardware/audio/default.nix

49 lines
1.1 KiB
Nix
Raw Permalink Normal View History

2025-01-08 02:06:46 +01:00
{ ... }:
{
2025-01-10 23:38:56 +01:00
security.rtkit.enable = true;
2025-01-08 02:06:46 +01:00
services.pipewire = {
enable = true;
alsa = {
enable = true;
support32Bit = true;
};
pulse.enable = true;
jack.enable = true;
# Reduce latency
# https://wiki.nixos.org/wiki/PipeWire#Low-latency_setup
extraConfig = {
pipewire."92-low-latency" = {
"context.properties" = {
"default.clock.rate" = 48000;
"default.clock.quantum" = 32;
"default.clock.min-quantum" = 32;
"default.clock.max-quantum" = 32;
};
};
pipewire-pulse."92-low-latency" = {
"context.properties" = [
{
name = "libpipewire-module-protocol-pulse";
args = { };
}
];
"pulse.properties" = {
"pulse.min.req" = "32/48000";
"pulse.default.req" = "32/48000";
"pulse.max.req" = "32/48000";
"pulse.min.quantum" = "32/48000";
"pulse.max.quantum" = "32/48000";
};
"stream.properties" = {
"node.latency" = "32/48000";
"resample.quality" = 1;
};
};
};
};
}