roles: Add airplay-server role (pkg + open ports)

Signed-off-by: Ivan Bushchik <ivabus@ivabus.dev>
This commit is contained in:
Ivan Bushchik 2024-01-06 13:20:32 +03:00
parent 59f4b1ad16
commit a6bdd96a86
No known key found for this signature in database
GPG key ID: 2F16FBF3262E090C
2 changed files with 13 additions and 0 deletions

12
roles/airplay-server.nix Normal file
View file

@ -0,0 +1,12 @@
{ 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 ];
};
}

View file

@ -1,5 +1,6 @@
{
imports = [
./airplay-server.nix
./design.nix
./devel.nix
./gaming.nix