nixos/roles/airplay-server.nix
Ivan Bushchik a6bdd96a86
roles: Add airplay-server role (pkg + open ports)
Signed-off-by: Ivan Bushchik <ivabus@ivabus.dev>
2024-01-06 13:20:32 +03:00

12 lines
396 B
Nix

{ config, pkgs, lib, ... }:
let cfg = config.my.roles.airplay-server;
in {
options.my.roles.airplay-server.enable =
lib.mkEnableOption "Enable uxplay and open ports";
config = lib.mkIf (cfg.enable) {
environment.systemPackages = with pkgs; [ uxplay ];
networking.firewall.allowedUDPPorts = [ 6000 6001 7011 ];
networking.firewall.allowedTCPPorts = [ 7000 7001 7100 ];
};
}