From 7ef2d83828dc123a0a5805275ad913e2b3b7b9ca Mon Sep 17 00:00:00 2001 From: Andre Date: Thu, 29 Feb 2024 17:57:38 -0500 Subject: [PATCH] Fix bluetooth audio config --- modules/base/bluetooth.nix | 34 ++++++++++------------------------ 1 file changed, 10 insertions(+), 24 deletions(-) diff --git a/modules/base/bluetooth.nix b/modules/base/bluetooth.nix index 3795301..29d1133 100644 --- a/modules/base/bluetooth.nix +++ b/modules/base/bluetooth.nix @@ -31,30 +31,16 @@ with lib; liblc3 ]; - # Enable Pipewire codec support - see https://pipewire.pages.freedesktop.org/wireplumber/daemon/configuration/bluetooth.html - # FIXME: Editing etc packages causes a "permission denied" build error. Not sure of the cause. - /* - environment.etc = lib.mkIf (config.sound.enable == true) { - "wireplumber/bluetooth.lua.d/51-bluez-config.lua".text = '' - bluez_monitor.properties = { - ["bluez5.enable-sbc-xq"] = true, - ["bluez5.enable-msbc"] = true, - ["bluez5.enable-hw-volume"] = true, - ["bluez5.headset-roles"] = "[ hsp_hs hsp_ag hfp_hf hfp_ag ]", - ["bluez5.auto-connect"] = "[ hfp_hf hsp_hs a2dp_sink ]" - } - ''; - - # Reduce audio latency per https://nixos.wiki/wiki/PipeWire#Low-latency_setup - "pipewire/pipewire.conf.d/92-low-latency.conf".text = '' - context.properties = { - default.clock.rate = 48000 - default.clock.quantum = 32 - default.clock.min-quantum = 32 - default.clock.max-quantum = 32 - } - ''; + # Reduce audio latency per https://nixos.wiki/wiki/PipeWire#Low-latency_setup + services.pipewire.extraConfig.pipewire = lib.mkIf (config.sound.enable == true) { + "92-low-latency.conf" = { + "context.properties" = { + "default.clock.rate" = 48000; + "default.clock.quantum" = 32; + "default.clock.min-quantum" = 32; + "default.clock.max-quantum" = 32; + }; + }; }; - */ }; } \ No newline at end of file