feat(servers): add minecraft server configs for nomi and cv
All checks were successful
Discord / discord commits (push) Successful in 1m12s

This commit is contained in:
matt1432 2023-12-26 17:10:10 -05:00
parent 4884cad9a1
commit 9ae0a96678
5 changed files with 94 additions and 3 deletions

View file

@ -32,13 +32,13 @@
"\"git.nelim.org. IN A 24.200.126.219\""
"\"mc.nelim.org IN A 100.64.0.4\""
"\"mc.nelim.org IN A 100.64.0.7\""
"\"_minecraft._tcp.mc.nelim.org. 180 IN SRV 0 0 25569 mc.nelim.org.\""
"\"cv.nelim.org IN A 100.64.0.4\""
"\"cv.nelim.org IN A 100.64.0.7\""
"\"_minecraft._tcp.cv.nelim.org. 180 IN SRV 0 0 25566 cv.nelim.org.\""
"\"mc2.nelim.org IN A 100.64.0.4\""
"\"mc2.nelim.org IN A 100.64.0.7\""
"\"_minecraft._tcp.mc2.nelim.org. 180 IN SRV 0 0 25560 mc2.nelim.org.\""
"\"ota.nelim.org. IN A 100.64.0.5\""

View file

@ -6,6 +6,7 @@
../../modules/tailscale.nix
./modules/binary-cache.nix
./modules/minecraft.nix
];
vars = {

View file

@ -0,0 +1,90 @@
{
config,
nms,
pkgs,
...
}: {
imports = [nms.nixosModules.default];
services.modded-minecraft-servers = {
eula = true;
user = config.vars.user;
group = "users";
instances = let
jre8 = pkgs.temurin-bin-8;
jre17 = pkgs.temurin-bin-17;
defaults = {
spawn-protection = 0;
max-tick-time = 5 * 60 * 1000;
allow-flight = true;
};
in {
# Vanilla Survival
sv = {
enable = false;
serverConfig =
{
server-port = 25566;
extra-options = {
};
}
// defaults;
};
# Vanilla Creative
cv = {
enable = true;
jvmMaxAllocation = "6G";
jvmInitialAllocation = "2G";
jvmPackage = jre17;
jvmOpts = "";
serverConfig =
{
server-port = 25569;
motd = "creative mode gaming";
extra-options = {
difficulty = "hard";
enable-command-block = true;
enforce-whitelist = true;
gamemode = "creative";
max-players = 6;
view-distance = 16;
};
}
// defaults;
};
# Modded https://www.curseforge.com/minecraft/modpacks/nomi-ceu
nomi = {
enable = true;
jvmMaxAllocation = "10G";
jvmInitialAllocation = "2G";
jvmPackage = jre8;
jvmOpts = "";
serverConfig =
{
server-port = 25560;
motd = "motd=Nomi CEu Server, v1.7-alpha-2";
extra-options = {
max-players = 8;
difficulty = 1;
view-distance = 10;
simulation-distance = 10;
level-type = "lostcities";
};
}
// defaults;
};
};
};
}

Binary file not shown.

BIN
flake.nix

Binary file not shown.