commit ed948f8f25e90aa7e798b688b534835b95ff671e parent f5789df25c41cae83b755f69f74ff6f4fbcd7c30 Author: Vincent Demeester <vincent@sbr.pm> Date: Thu, 4 Jan 2024 18:26:55 +0100 systems: configure pulseaudio/pipewire for network… … discovery, such as airplay. Signed-off-by: Vincent Demeester <vincent@sbr.pm> Diffstat:
M | systems/modules/hardware/audio.nix | | | 16 | ++++++++++++++++ |
1 file changed, 16 insertions(+), 0 deletions(-)
diff --git a/systems/modules/hardware/audio.nix b/systems/modules/hardware/audio.nix @@ -38,12 +38,28 @@ in pulse.enable = true; wireplumber.enable = true; }; + environment.etc."pipewire/pipewire.conf.d/raop-discover.conf".text = '' + context.modules = [ + { + name = libpipewire-module-raop-discover + args = { } + } + ] + ''; + environment.etc."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" } + ] + ''; }) (mkIf cfg.pulseaudio.enable { # Enable and configure pulseaudio hardware.pulseaudio = { enable = true; support32Bit = true; + zeroconf.discovery.enable = true; }; }) (mkIf (cfg.pulseaudio.enable || cfg.pipewire.enable) {