1
0
Fork 0

rpi-ext: audio server

This commit is contained in:
Sebastien Bourdeauducq 2021-03-17 18:39:46 +08:00
parent fbda8b0643
commit 42e67398bf
1 changed files with 11 additions and 1 deletions

View File

@ -12,6 +12,9 @@
boot.loader.raspberryPi = pkgs.lib.mkIf rpi4 { boot.loader.raspberryPi = pkgs.lib.mkIf rpi4 {
enable = true; enable = true;
version = 4; version = 4;
firmwareConfig = ''
dtparam=audio=on
'';
}; };
boot.kernelPackages = if rpi4 then pkgs.linuxPackages_rpi4 else pkgs.linuxPackages_rpi3; boot.kernelPackages = if rpi4 then pkgs.linuxPackages_rpi4 else pkgs.linuxPackages_rpi3;
hardware.deviceTree.enable = true; hardware.deviceTree.enable = true;
@ -129,7 +132,14 @@
services.printing.defaultShared = true; services.printing.defaultShared = true;
hardware.sane.enable = true; hardware.sane.enable = true;
hardware.sane.extraBackends = [ pkgs.hplip ]; 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 ]; networking.firewall.allowedUDPPorts = [ 53 67 ];
nix.binaryCachePublicKeys = ["nixbld.m-labs.hk-1:5aSRVA5b320xbNvu30tqxVPXpld73bhtOeH6uAjRyHc="]; nix.binaryCachePublicKeys = ["nixbld.m-labs.hk-1:5aSRVA5b320xbNvu30tqxVPXpld73bhtOeH6uAjRyHc="];