etna: add minecraft server

This commit is contained in:
uku 2024-02-17 15:15:15 +01:00
parent 326e975fe3
commit 5ce49a0120
Signed by: uku
SSH key fingerprint: SHA256:4P0aN6M8ajKukNi6aPOaX0LacanGYtlfjmN+m/sHY/o
3 changed files with 38 additions and 0 deletions

View file

@ -10,10 +10,13 @@
apiRsEnv.file = "${path}/apiRsEnv.age";
ukubotRsEnv.file = "${path}/ukubotRsEnv.age";
ngrokEnv.file = "${path}/ngrokEnv.age";
};
boot.loader.systemd-boot.enable = true;
networking.firewall.allowedTCPPorts = [4040];
services = {
api-rs = {
enable = true;
@ -55,4 +58,26 @@
};
};
};
virtualisation.oci-containers.containers = {
"ngrok" = {
image = "ngrok/ngrok";
ports = ["4040:4040"];
cmd = ["tcp" "25565"];
extraOptions = ["--net=host"];
environmentFiles = [config.age.secrets.ngrokEnv.path];
};
"minecraft" = {
image = "itzg/minecraft-server";
ports = ["25565:25565"];
volumes = ["/data/minecraft:/data"];
environment = {
EULA = "true";
MODRINTH_MODPACK = "adrenaserver";
MODRINTH_VERSION = "1.5.0+1.20.4.fabric";
MODRINTH_LOADER = "fabric";
};
};
};
}