c3h-nixfiles/shared-services/pulseaudio.nix
2021-11-04 20:18:34 +01:00

16 lines
573 B
Nix

{ pkgs, ... }:
{
networking.firewall.allowedTCPPorts = [ 4713 ];
sound.enable = true;
hardware.pulseaudio.enable = true;
hardware.pulseaudio.systemWide = true;
hardware.pulseaudio.package = pkgs.pulseaudioFull;
hardware.pulseaudio.tcp.enable = true;
hardware.pulseaudio.tcp.anonymousClients.allowedIpRanges = [ "127.0.0.0/8" "::/64" "10.23.42.0/24" ];
environment.variables.PULSE_SERVER = "127.0.0.1";
hardware.pulseaudio.extraConfig = ''
unload-module module-native-protocol-unix
load-module module-native-protocol-unix auth-anonymous=1
'';
}