From 7c4e16c951fca7279329b1e1c912b76e4203c633 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sat, 12 Feb 2022 20:14:06 +0100 Subject: sif: pipewire --- hosts/sif/default.nix | 41 +++++++++++++++++++++++++++++++++++++---- 1 file changed, 37 insertions(+), 4 deletions(-) (limited to 'hosts') diff --git a/hosts/sif/default.nix b/hosts/sif/default.nix index 1460ad2a..a74c9184 100644 --- a/hosts/sif/default.nix +++ b/hosts/sif/default.nix @@ -325,15 +325,48 @@ in { groups.plugdev = {}; }; - hardware = { - pulseaudio = { + security.rtkit.enable = true; + services.pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + jack.enable = true; + + media-session = { enable = true; - package = with pkgs; pulseaudioFull; - support32Bit = true; + config.bluez-monitor.rules = [ + { # Matches all cards + matches = [ { "device.name" = "~bluez_card.*"; } ]; + actions = { + "update-props" = { + "bluez5.reconnect-profiles" = [ "hfp_hf" "hsp_hs" "a2dp_sink" ]; + # mSBC is not expected to work on all headset + adapter combinations. + "bluez5.msbc-support" = true; + }; + }; + } + { + matches = [ + # Matches all sources + { "node.name" = "~bluez_input.*"; } + # Matches all outputs + { "node.name" = "~bluez_output.*"; } + ]; + actions = { + "update-props" = { + "node.pause-on-idle" = false; + }; + }; + } + ]; }; + }; + hardware = { bluetooth = { enable = true; + package = pkgs.bluezFull; settings = { General = { Enable = "Source,Sink,Media,Socket"; -- cgit v1.2.3