nixos/pipewire: raopOpenFirewall option

RAOP requires UDP/6001-6002 for timing
information, and won't work with apple devices if
firewall is enabled.
This commit is contained in:
Cabia Rangris 2024-03-20 18:18:29 +03:00
parent 75b594c64f
commit eaf6b74366
No known key found for this signature in database
GPG key ID: 08AA9711F8CD40CF

View file

@ -95,6 +95,14 @@ in {
enable = mkEnableOption (lib.mdDoc "JACK audio emulation");
};
raopOpenFirewall = mkOption {
type = lib.types.bool;
default = false;
description = lib.mdDoc ''
Opens UDP/6001-6002, required by RAOP/Airplay for timing and control data.
'';
};
pulse = {
enable = mkEnableOption (lib.mdDoc "PulseAudio server emulation");
};
@ -371,6 +379,8 @@ in {
environment.sessionVariables.LD_LIBRARY_PATH =
lib.mkIf cfg.jack.enable [ "${cfg.package.jack}/lib" ];
networking.firewall.allowedUDPPorts = lib.mkIf cfg.raopOpenFirewall [ 6001 6002 ];
users = lib.mkIf cfg.systemWide {
users.pipewire = {
uid = config.ids.uids.pipewire;