modded i guess

This commit is contained in:
2026-07-01 22:30:51 -05:00
parent 9e3955a0f9
commit ae0c4a9df2
3 changed files with 19 additions and 12 deletions
+5 -2
View File
@@ -15,7 +15,7 @@
../../../modules/homelab ../../../modules/homelab
#../../../modules/fileshares/holocron #../../../modules/fileshares/holocron
#../../../modules/gameservers/minecraft_recpro #../../../modules/gameservers/minecraft_recpro
#../../../modules/gameservers/minecraft_modded ../../../modules/gameservers/minecraft_modded
]; ];
home-manager.users.blake.imports = [ home-manager.users.blake.imports = [
@@ -72,7 +72,10 @@
# gameservers = { # gameservers = {
# minecraft_recpro.enable = true; # minecraft_recpro.enable = true;
# minecraft_modded.enable = true; minecraft_modded = {
enable = true;
url = "raceraskedforthisenjoyyall.recoil.pro"
};
# }; # };
# boot (systemd is going on me) # boot (systemd is going on me)
+3 -3
View File
@@ -112,7 +112,7 @@ in {
# what actually does the forwarding # what actually does the forwarding
firewall = { firewall = {
enable = true; 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: # tailscale will also need its UDP port open:
allowedUDPPorts = [config.services.tailscale.port 25777 21116]; allowedUDPPorts = [config.services.tailscale.port 25777 21116];
trustedInterfaces = ["tailscale0"]; 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 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 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 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 # 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 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 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 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
''; '';
}; };
}; };
@@ -8,8 +8,12 @@
cfg = config.gameservers.${service}; cfg = config.gameservers.${service};
sec = config.sops.secrets; sec = config.sops.secrets;
servers = { servers = {
cobblemon = { # cobblemon = {
data_dir = "/var/lib/gameservers/minecraft_modded/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"; start_file = "start.sh";
}; };
}; };
@@ -18,7 +22,7 @@ in {
enable = lib.mkEnableOption "enables ${service}"; enable = lib.mkEnableOption "enables ${service}";
url = lib.mkOption { url = lib.mkOption {
type = lib.types.str; type = lib.types.str;
default = "mc.recoil.pro"; default = "modded.recoil.pro";
description = "set domain for ${service}"; description = "set domain for ${service}";
}; };
data_dir = lib.mkOption { data_dir = lib.mkOption {
@@ -38,7 +42,7 @@ in {
}; };
motd_gs = lib.mkOption { motd_gs = lib.mkOption {
type = lib.types.nullOr lib.types.str; type = lib.types.nullOr lib.types.str;
default = ["cobblemon"]; default = ["craftoria"];
}; };
backup_repo = lib.mkOption { backup_repo = lib.mkOption {
type = lib.types.path; type = lib.types.path;
@@ -75,8 +79,8 @@ in {
Group = "minecraft"; Group = "minecraft";
WorkingDirectory = srv.data_dir; WorkingDirectory = srv.data_dir;
UMask = "0007"; 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 = "${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 = "${srv.data_dir}/${srv.start_file}";
Restart = "on-failure"; Restart = "on-failure";
KillMode = "process"; KillMode = "process";
}; };
@@ -104,7 +108,7 @@ in {
# }; # };
# open firewall # open firewall
networking.firewall.allowedTCPPorts = [25778]; networking.firewall.allowedTCPPorts = [25779];
# sops.secrets = { # sops.secrets = {
# "velocity_forwarding" = { # "velocity_forwarding" = {