NixOS-Config/system/server/minecraft/servers/velocity.nix
2024-10-11 22:22:50 -04:00

50 lines
2.1 KiB
Nix

{pkgs, ...}: let
common = import ../common.nix { inherit pkgs; };
in {
services.minecraft-servers.servers.velocity = {
enable = true;
package = pkgs.velocityServers.velocity;
jvmOpts = "-Xmx512M";
symlinks = {
"plugins/Geyser.jar" = builtins.fetchurl {
url = "https://download.geysermc.org/v2/projects/geyser/versions/2.4.3/builds/688/downloads/velocity";
sha256 = "0gmsr2pspjklnshrrm7ril8c669gsac4v9ck4n6j85p0dp6aizql";
};
"plugins/Floodgate.jar" = builtins.fetchurl {
url = "https://download.geysermc.org/v2/projects/floodgate/versions/2.2.3/builds/112/downloads/velocity";
sha256 = "1cbb9qdlk9nw2q1vchq4fq553qxqi49268pg46b426wsa1yxjqa9";
};
"plugins/LuckPerms.jar" = builtins.fetchurl {
url = "https://download.luckperms.net/1556/velocity/LuckPerms-Velocity-5.4.141.jar";
sha256 = "0j5f7r3g8h4f8z8ppakwfk96hijp3slr0vxyj9v8x4h8w5rcl9d1";
};
"plugins/SkinsRestorer.jar" = builtins.fetchurl {
url = "https://github.com/SkinsRestorer/SkinsRestorer/releases/download/15.4.2/SkinsRestorer.jar";
sha256 = "14nl9mi958bfqwqz9182cxj7m6l15kalq3wjmjqzy50s52si35wf";
};
"plugins/ViaVersion.jar" = builtins.fetchurl {
url = "https://github.com/ViaVersion/ViaVersion/releases/download/5.0.3/ViaVersion-5.0.3.jar";
sha256 = "02gf91ysialgvbl0w8awa0dsi1yb33ac7clmz0wika1xigk9z10r";
};
"plugins/ViaBackwards.jar" = builtins.fetchurl {
url = "https://github.com/ViaVersion/ViaBackwards/releases/download/5.0.3/ViaBackwards-5.0.3.jar";
sha256 = "1wqk68pjrzl1zhajb9lxa1s6wzj85rb0c2riycv9yysr5bcxssqi";
};
"plugins/Voicechat.jar" = builtins.fetchurl {
url = "https://cdn.modrinth.com/data/9eGKb6K1/versions/svvcJhgC/voicechat-velocity-2.5.20.jar";
sha256 = "0nw85x24qa9skbhfgbhsjl2r7d9xshr9f04nnq490zbgz7716lqq";
};
};
};
# Open ports for proxy
networking.firewall = {
allowedTCPPorts = [
25565 19132 30013 5657 # Minecraft server info
];
allowedUDPPorts = [
25565 19132 30013 # Minecraft server, VC, and Bedrock
];
};
}