1
1
Fork 0
nixos/options/custom/services/pipewire.nix
Myned f38f84ea0c
pipewire: move hardware.pulseaudio to services
Signed-off-by: Myned <dev@bjork.tech>
2025-01-08 17:13:11 -06:00

42 lines
977 B
Nix

{
config,
lib,
...
}:
with lib; let
cfg = config.custom.services.pipewire;
in {
options.custom.services.pipewire.enable = mkOption {default = false;};
config = mkIf cfg.enable {
#!! Realtime priority may cause desync
#// security.rtkit.enable = true;
services = {
pulseaudio.enable = false;
# https://wiki.nixos.org/wiki/PipeWire
# https://gitlab.freedesktop.org/pipewire/pipewire
pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
# Avoid resampling if possible
# https://wiki.archlinux.org/title/PipeWire#Changing_the_allowed_sample_rate(s)
extraConfig.pipewire = {
"10-sample-rate"."context.properties"."default.clock.allowed-rates" = [
32000
44100
48000
88200
96000
176400
192000
];
};
};
};
};
}