main
1{
2 pkgs,
3 desktop,
4 ...
5}:
6{
7 # hardware.pulseaudio.enable = lib.mkForce false;
8
9 services.pipewire = {
10 enable = true;
11 alsa.enable = true;
12 alsa.support32Bit = true;
13 pulse.enable = true;
14 wireplumber = {
15 enable = true;
16 configPackages = [
17 (pkgs.writeTextDir "share/wireplumber/bluetooth.lua.d/51-bluez-config.lua" ''
18 bluez_monitor.properties = {
19 ["bluez5.enable-sbc-xq"] = true,
20 ["bluez5.enable-msbc"] = true,
21 ["bluez5.enable-hw-volume"] = true,
22 ["bluez5.headset-roles"] = "[ hsp_hs hsp_ag hfp_hf hfp_ag ]"
23 }
24 '')
25 ];
26 };
27 };
28 environment.systemPackages =
29 with pkgs;
30 if (builtins.isString desktop) then
31 [
32 pwvucontrol
33 apulse # allow alsa application to use pulse
34 # pavucontrol
35 ]
36 else
37 [ ];
38}