From 42e67398bff5c4dc9d0a36cf635282b9dfc1c271 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Wed, 17 Mar 2021 18:39:46 +0800 Subject: [PATCH] rpi-ext: audio server --- nixops/rpi-server.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/nixops/rpi-server.nix b/nixops/rpi-server.nix index 21d201e..13ea3e1 100644 --- a/nixops/rpi-server.nix +++ b/nixops/rpi-server.nix @@ -12,6 +12,9 @@ boot.loader.raspberryPi = pkgs.lib.mkIf rpi4 { enable = true; version = 4; + firmwareConfig = '' + dtparam=audio=on + ''; }; boot.kernelPackages = if rpi4 then pkgs.linuxPackages_rpi4 else pkgs.linuxPackages_rpi3; hardware.deviceTree.enable = true; @@ -129,7 +132,14 @@ services.printing.defaultShared = true; hardware.sane.enable = true; hardware.sane.extraBackends = [ pkgs.hplip ]; - networking.firewall.allowedTCPPorts = [ 631 ]; + + sound.enable = true; + hardware.pulseaudio.enable = true; + hardware.pulseaudio.systemWide = true; + hardware.pulseaudio.tcp.enable = true; + hardware.pulseaudio.tcp.anonymousClients.allowedIpRanges = ["192.168.1.0/24"]; + + networking.firewall.allowedTCPPorts = [ 631 4713 ]; networking.firewall.allowedUDPPorts = [ 53 67 ]; nix.binaryCachePublicKeys = ["nixbld.m-labs.hk-1:5aSRVA5b320xbNvu30tqxVPXpld73bhtOeH6uAjRyHc="];