From cb84b494386445be25e397e2f2231615b306865a Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Mon, 25 Apr 2022 15:12:16 +0200 Subject: [PATCH] modules: hardware: bluetooth: add wireplumber conf Now that `media-session` is deprecated, I should at least replicate this configuration for `wireplumber`. --- modules/hardware/bluetooth/default.nix | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/modules/hardware/bluetooth/default.nix b/modules/hardware/bluetooth/default.nix index ffe0fbe..6aeb7dc 100644 --- a/modules/hardware/bluetooth/default.nix +++ b/modules/hardware/bluetooth/default.nix @@ -25,6 +25,21 @@ in package = pkgs.pulseaudioFull; }; + # FIXME: waiting for NixOS module configuration + environment.etc = { + "wireplumber/bluetooth.lua.d/50-bluez-config.lua".text = '' + bluez_monitor.properties = { + ["bluez5.headset-roles"] = "[ hsp_hs hsp_ag hfp_hf hfp_ag ]" + -- mSBC provides better audio + microphone + ["bluez5.enable-msbc"] = true, + -- SBC XQ provides better audio + ["bluez5.enable-sbc-xq"] = true, + -- Hardware volume control + ["bluez5.enable-hw-volume"] = true, + } + ''; + }; + services.pipewire = { media-session.config.bluez-monitor.rules = [ {