games: add server for minecraft neoforge 1.21.1

This commit is contained in:
Nico 2025-05-10 21:05:28 +10:00
parent 084f9fca35
commit 0e7830dc43

View file

@ -0,0 +1,31 @@
{ config, pkgs, ... }:
{
virtualisation.oci-containers.containers.neoforge-1-21-1 = {
user = "minecraft:minecraft";
image = "docker.io/itzg/minecraft-server";
volumes = [ "/var/lib/minecraft/forge-1-21-1:/data" ];
ports = [ "30005:30005" ];
environment = {
TYPE = "NEOFORGE";
VERSION = "1.21.1";
EULA = "TRUE";
MEMORY = "4G";
SERVER_PORT = "30005";
UID = "992";
GID = "991";
};
};
services.minecraft-servers.servers.velocity.symlinks."velocity.toml".value = {
servers = {
neoforge-1-21-1 = "127.0.0.1:30005";
# In what order we should try servers when a player logs in or is kicked from a server.
try = [
"neoforge-1-21-1"
];
};
};
}