diff --git a/roles/airplay-server.nix b/roles/airplay-server.nix new file mode 100644 index 0000000..85e1d82 --- /dev/null +++ b/roles/airplay-server.nix @@ -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 ]; + }; +} diff --git a/roles/default.nix b/roles/default.nix index 170ff92..2c372b7 100644 --- a/roles/default.nix +++ b/roles/default.nix @@ -1,5 +1,6 @@ { imports = [ + ./airplay-server.nix ./design.nix ./devel.nix ./gaming.nix