From ae0c4a9df2180275ca3e9df97210d31251b04468 Mon Sep 17 00:00:00 2001 From: blake Date: Wed, 1 Jul 2026 22:30:51 -0500 Subject: [PATCH] modded i guess --- hosts/nixos/snowbelle/configuration.nix | 7 +++++-- hosts/nixos/vaniville/configuration.nix | 6 +++--- .../gameservers/minecraft_modded/default.nix | 18 +++++++++++------- 3 files changed, 19 insertions(+), 12 deletions(-) diff --git a/hosts/nixos/snowbelle/configuration.nix b/hosts/nixos/snowbelle/configuration.nix index 94fa742..7055839 100644 --- a/hosts/nixos/snowbelle/configuration.nix +++ b/hosts/nixos/snowbelle/configuration.nix @@ -15,7 +15,7 @@ ../../../modules/homelab #../../../modules/fileshares/holocron #../../../modules/gameservers/minecraft_recpro - #../../../modules/gameservers/minecraft_modded + ../../../modules/gameservers/minecraft_modded ]; home-manager.users.blake.imports = [ @@ -72,7 +72,10 @@ # gameservers = { # minecraft_recpro.enable = true; - # minecraft_modded.enable = true; + minecraft_modded = { + enable = true; + url = "raceraskedforthisenjoyyall.recoil.pro" + }; # }; # boot (systemd is going on me) diff --git a/hosts/nixos/vaniville/configuration.nix b/hosts/nixos/vaniville/configuration.nix index 259ead2..c70ff94 100644 --- a/hosts/nixos/vaniville/configuration.nix +++ b/hosts/nixos/vaniville/configuration.nix @@ -112,7 +112,7 @@ in { # what actually does the forwarding firewall = { enable = true; - allowedTCPPorts = [22 80 443 25777 7567 21115 21116 21117 21118 21119]; + allowedTCPPorts = [22 80 443 25777 25579 7567 21115 21116 21117 21118 21119]; # tailscale will also need its UDP port open: allowedUDPPorts = [config.services.tailscale.port 25777 21116]; trustedInterfaces = ["tailscale0"]; @@ -131,13 +131,13 @@ in { iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 7567 -j DNAT --to-destination ${lumiose_ip}:7567 # gitea ssh iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 25777 -j DNAT --to-destination ${lumiose_ip}:25777 # recpro mc iptables -t nat -A PREROUTING -i eth0 -p udp --dport 25777 -j DNAT --to-destination ${lumiose_ip}:25777 # recpro mc - iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 25778 -j DNAT --to-destination ${lumiose_ip}:25778 # cbblemon mc + iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 25778 -j DNAT --to-destination ${snowbelle_ip}:25779 # craftoria mc # SNAT: ensure replies go back through VPS tailscale IP iptables -t nat -A POSTROUTING -o tailscale0 -p tcp --dport 7567 -d ${lumiose_ip}/32 -j SNAT --to-source ${vpsip4} # gitea ssh iptables -t nat -A POSTROUTING -o tailscale0 -p tcp --dport 25777 -d ${lumiose_ip}/32 -j SNAT --to-source ${vpsip4} # recpro mc iptables -t nat -A POSTROUTING -o tailscale0 -p udp --dport 25777 -d ${lumiose_ip}/32 -j SNAT --to-source ${vpsip4} # recpro mc - iptables -t nat -A POSTROUTING -o tailscale0 -p tcp --dport 25778 -d ${lumiose_ip}/32 -j SNAT --to-source ${vpsip4} # cbblemon mc + iptables -t nat -A POSTROUTING -o tailscale0 -p tcp --dport 25778 -d ${snowbelle_ip}/32 -j SNAT --to-source ${vpsip4} # craftoria mc ''; }; }; diff --git a/modules/gameservers/minecraft_modded/default.nix b/modules/gameservers/minecraft_modded/default.nix index 7458613..a967de3 100644 --- a/modules/gameservers/minecraft_modded/default.nix +++ b/modules/gameservers/minecraft_modded/default.nix @@ -8,8 +8,12 @@ cfg = config.gameservers.${service}; sec = config.sops.secrets; servers = { - cobblemon = { - data_dir = "/var/lib/gameservers/minecraft_modded/cobblemon"; + # cobblemon = { + # data_dir = "/var/lib/gameservers/minecraft_modded/cobblemon"; + # start_file = "start.sh"; + # }; + craftoria = { + data_dir = "/var/lib/gameservers/minecraft_modded/craftoria"; start_file = "start.sh"; }; }; @@ -18,7 +22,7 @@ in { enable = lib.mkEnableOption "enables ${service}"; url = lib.mkOption { type = lib.types.str; - default = "mc.recoil.pro"; + default = "modded.recoil.pro"; description = "set domain for ${service}"; }; data_dir = lib.mkOption { @@ -38,7 +42,7 @@ in { }; motd_gs = lib.mkOption { type = lib.types.nullOr lib.types.str; - default = ["cobblemon"]; + default = ["craftoria"]; }; backup_repo = lib.mkOption { type = lib.types.path; @@ -75,8 +79,8 @@ in { Group = "minecraft"; WorkingDirectory = srv.data_dir; UMask = "0007"; - ExecStart = "${pkgs.openjdk21}/bin/java -Xms4G -Xmx12G -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true @libraries/net/neoforged/neoforge/21.1.211/unix_args.txt"; - #ExecStart = "${srv.data_dir}/${srv.start_file}"; + #ExecStart = "${pkgs.openjdk21}/bin/java -Xms4G -Xmx12G -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true @libraries/net/neoforged/neoforge/21.1.211/unix_args.txt"; + ExecStart = "${srv.data_dir}/${srv.start_file}"; Restart = "on-failure"; KillMode = "process"; }; @@ -104,7 +108,7 @@ in { # }; # open firewall - networking.firewall.allowedTCPPorts = [25778]; + networking.firewall.allowedTCPPorts = [25779]; # sops.secrets = { # "velocity_forwarding" = {