From f38f84ea0c123694c8fe11acc0ca3a5c331ccef1 Mon Sep 17 00:00:00 2001 From: Myned Date: Wed, 8 Jan 2025 17:13:11 -0600 Subject: [PATCH] pipewire: move hardware.pulseaudio to services Signed-off-by: Myned --- options/custom/services/pipewire.nix | 43 +++++++++++++++------------- 1 file changed, 23 insertions(+), 20 deletions(-) diff --git a/options/custom/services/pipewire.nix b/options/custom/services/pipewire.nix index 4d1c1eb..f4f2c4c 100644 --- a/options/custom/services/pipewire.nix +++ b/options/custom/services/pipewire.nix @@ -9,30 +9,33 @@ in { options.custom.services.pipewire.enable = mkOption {default = false;}; config = mkIf cfg.enable { - # https://wiki.nixos.org/wiki/PipeWire - # https://gitlab.freedesktop.org/pipewire/pipewire #!! Realtime priority may cause desync #// security.rtkit.enable = true; - hardware.pulseaudio.enable = false; - services.pipewire = { - enable = true; - alsa.enable = true; - alsa.support32Bit = true; - pulse.enable = true; + services = { + pulseaudio.enable = false; - # 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 - ]; + # 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 + ]; + }; }; }; };