commit 7bd701ec01908cb5b7d039e07b78cab5e4e476b3
parent be92cc8d5438c241ae8522b140f3b7d3cfac6f66
Author: Vincent Demeester <vincent@sbr.pm>
Date: Mon, 4 Mar 2024 15:57:32 +0100
audio: update pipewire and wireplumber configurations
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Diffstat:
1 file changed, 30 insertions(+), 31 deletions(-)
diff --git a/systems/modules/hardware/audio.nix b/systems/modules/hardware/audio.nix
@@ -36,38 +36,37 @@ in
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
- wireplumber.enable = true;
- };
- environment.etc = {
- # "pipewire/pipewire.conf.d/session-manager.conf".text = ''
- # context.modules = [
- # { name = libpipewire-module-session-manager }
- # { name = libpipewire-module-client-device }
- # ]
- # '';
- "pipewire/pipewire-pulse.conf.d/50-network-party.conf".text = ''
- context.exec = [
- { path = "pactl" args = "load-module module-native-protocol-tcp" }
- { path = "pactl" args = "load-module module-zeroconf-discover" }
- { path = "pactl" args = "load-module module-zeroconf-publish" }
- ]
- '';
- "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 ]"
- }
- '';
+ wireplumber = {
+ enable = true;
+ configPackages = [
+ (pkgs.writeTextDir "share/wireplumber/bluetooth.lua.d/51-bluez-config.lua" ''
+ 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 ]"
+ }
+ '')
+ ];
+ };
+ extraConfig = {
+ pipewire-pulse = {
+ "50-network-party.conf" = {
+ "context.modules" = [
+ { name = "libpipewire-module-protocol-native"; }
+ { name = "libpipewire-module-client-node"; }
+ { name = "libpipewire-module-adapter"; }
+ { name = "libpipewire-module-metadata"; }
+ ];
+ "context.exec" = [
+ { path = "pactl"; args = "load-module module-native-protocol-tcp"; }
+ { path = "pactl"; args = "load-module module-zeroconf-discover"; }
+ { path = "pactl"; args = "load-module module-zeroconf-publish"; }
+ ];
+ };
+ };
+ };
};
- /*
- wireplumber.profiles = {
- main = {
- monitor.alsa = required
- }
- }
- */
networking.firewall = {
allowedTCPPorts = [ 6001 6002 ];
};