Merge pull request #297479 from cab404/raop-firewall

nixos/pipewire: raopOpenFirewall option
This commit is contained in:
K900 2024-03-21 18:05:20 +03:00 committed by GitHub
commit d23f4b140f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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;