dots/modules/games/server/minecraft/forge-1.19.2.nix
Nico 093c102a6b minecraft: use docker image for forge 1.19.2 server
nix-minecraft does not support forge and its hard to try and get forge
to install
2025-05-10 18:00:34 +10:00

32 lines
744 B
Nix

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