diff options
| author | Caroline Larimore <caroline@larimo.re> | 2024-09-19 21:50:05 -0700 |
|---|---|---|
| committer | Caroline Larimore <caroline@larimo.re> | 2024-09-19 21:52:56 -0700 |
| commit | 9c78253c6c753e7ebc492d682907097505c6075b (patch) | |
| tree | 4e5f70c2167163e37300aa7862914d48faa03989 /roles/minecraft/zenith | |
| parent | 6bc6e37af5b21b0356d0e008f83eee5378fc8b43 (diff) | |
role: minecraft: create zenithproxy skeleton
Diffstat (limited to 'roles/minecraft/zenith')
| -rw-r--r-- | roles/minecraft/zenith/default.nix | 24 |
1 files changed, 24 insertions, 0 deletions
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 ]; + }; +} |