Commit fc5cf4df0ef4

Vincent Demeester <vincent@sbr.pm>
2018-08-05 17:38:33
Allow anon pulseaudio remote connection (from allowed ips)
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
1 parent c7512b0
Changed files (1)
profiles
profiles/audio.nix
@@ -1,34 +1,37 @@
 { config, pkgs, ... }:
 
 {
-	hardware = {
-		pulseaudio = {
-			enable = true;
-			support32Bit = true;
-			zeroconf = {
-				discovery.enable = true;
-				publish.enable = true;
-			};
-			tcp = {
-				enable = true;
-				anonymousClients.allowedIpRanges = [ "127.0.0.1" ];
-			};
-			package = pkgs.pulseaudioFull;
-		};
-	};
-	sound.mediaKeys.enable = true;
+  hardware = {
+    pulseaudio = {
+      enable = true;
+      support32Bit = true;
+      zeroconf = {
+        discovery.enable = true;
+        publish.enable = true;
+      };
+      tcp = {
+        enable = true;
+        anonymousClients = {
+          allowAll = true;
+          allowedIpRanges = [ "127.0.0.1" "192.168.12.0/24" "10.0.0.0/24" ];
+        };
+      };
+      package = pkgs.pulseaudioFull;
+    };
+  };
+  sound.mediaKeys.enable = true;
 
-	# spotify
-	networking.firewall.allowedTCPPorts = [ 57621 57622 ];
-	networking.firewall.allowedUDPPorts = [ 57621 57622 ];
-	
-	environment.systemPackages = with pkgs; [
-		apulse       # allow alsa application to use pulse
-		pavucontrol  # pulseaudio volume control
-		pasystray    # systray application
-		playerctl
-	];
+  # spotify
+  networking.firewall.allowedTCPPorts = [ 57621 57622 ];
+  networking.firewall.allowedUDPPorts = [ 57621 57622 ];
 
-	# We assume xserver runs when pulseaudio does
-	services.xserver.displayManager.sessionCommands = "${pkgs.pasystray}/bin/pasystray &";
+  environment.systemPackages = with pkgs; [
+    apulse       # allow alsa application to use pulse
+    pavucontrol  # pulseaudio volume control
+    pasystray    # systray application
+    playerctl
+  ];
+
+  # We assume xserver runs when pulseaudio does
+  services.xserver.displayManager.sessionCommands = "${pkgs.pasystray}/bin/pasystray &";
 }