From 9c78253c6c753e7ebc492d682907097505c6075b Mon Sep 17 00:00:00 2001 From: Caroline Larimore Date: Thu, 19 Sep 2024 21:50:05 -0700 Subject: role: minecraft: create zenithproxy skeleton --- roles/minecraft/zenith/default.nix | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 roles/minecraft/zenith/default.nix (limited to 'roles/minecraft/zenith') diff --git a/roles/minecraft/zenith/default.nix b/roles/minecraft/zenith/default.nix new file mode 100644 index 0000000..29cd880 --- /dev/null +++ b/roles/minecraft/zenith/default.nix @@ -0,0 +1,24 @@ +{ config, lib, pkgs, ... }: +with lib; + +let cfg = config.roles.minecraft.zenith; in { + options.roles.minecraft.zenith = { + enable = mkEnableOption "zenith proxy role"; + + port = mkOption { + type = types.port; + default = 25565; + description = "server port"; + }; + + openFirewall = mkOption { + type = types.bool; + default = true; + description = "open firewall"; + }; + }; + + config = mkIf cfg.enable { + networking.firewall.allowedTCPPorts = mkIf cfg.openFirewall [ cfg.port ]; + }; +} -- cgit v1.2.3