2023-12-26 17:10:10 -05:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
nms,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}: {
|
|
|
|
imports = [nms.nixosModules.default];
|
|
|
|
|
2023-12-27 00:33:19 -05:00
|
|
|
services = {
|
|
|
|
modded-minecraft-servers = {
|
|
|
|
eula = true;
|
|
|
|
user = config.vars.user;
|
2023-12-26 17:10:10 -05:00
|
|
|
|
2023-12-27 00:33:19 -05:00
|
|
|
instances = let
|
|
|
|
jre8 = pkgs.temurin-bin-8;
|
|
|
|
jre17 = pkgs.temurin-bin-17;
|
2023-12-26 17:10:10 -05:00
|
|
|
|
2023-12-27 00:33:19 -05:00
|
|
|
defaults = {
|
|
|
|
spawn-protection = 0;
|
|
|
|
max-tick-time = 5 * 60 * 1000;
|
|
|
|
allow-flight = true;
|
|
|
|
};
|
|
|
|
in {
|
|
|
|
# Vanilla Survival
|
|
|
|
sv = {
|
|
|
|
enable = false;
|
2023-12-26 17:10:10 -05:00
|
|
|
|
2023-12-27 00:33:19 -05:00
|
|
|
serverConfig =
|
|
|
|
{
|
|
|
|
server-port = 25569;
|
2023-12-26 17:10:10 -05:00
|
|
|
|
2023-12-27 00:33:19 -05:00
|
|
|
extra-options = {
|
|
|
|
};
|
|
|
|
}
|
|
|
|
// defaults;
|
|
|
|
};
|
2023-12-26 17:10:10 -05:00
|
|
|
|
2023-12-27 00:33:19 -05:00
|
|
|
# Vanilla Creative
|
|
|
|
cv = {
|
|
|
|
enable = true;
|
2023-12-26 17:10:10 -05:00
|
|
|
|
2023-12-27 00:33:19 -05:00
|
|
|
jvmMaxAllocation = "6G";
|
|
|
|
jvmInitialAllocation = "2G";
|
|
|
|
jvmPackage = jre17;
|
|
|
|
jvmOpts = "";
|
2023-12-26 17:10:10 -05:00
|
|
|
|
2023-12-27 00:33:19 -05:00
|
|
|
serverConfig =
|
|
|
|
{
|
|
|
|
server-port = 25566;
|
|
|
|
motd = "creative mode gaming";
|
2023-12-26 17:10:10 -05:00
|
|
|
|
2023-12-27 00:33:19 -05:00
|
|
|
extra-options = {
|
|
|
|
difficulty = "hard";
|
|
|
|
enable-command-block = true;
|
|
|
|
enforce-whitelist = true;
|
|
|
|
gamemode = "creative";
|
|
|
|
max-players = 6;
|
|
|
|
view-distance = 16;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
// defaults;
|
|
|
|
};
|
2023-12-26 17:10:10 -05:00
|
|
|
|
2023-12-27 00:33:19 -05:00
|
|
|
# Modded https://www.curseforge.com/minecraft/modpacks/nomi-ceu
|
|
|
|
nomi = {
|
|
|
|
enable = false;
|
2023-12-26 17:10:10 -05:00
|
|
|
|
2023-12-27 00:33:19 -05:00
|
|
|
jvmMaxAllocation = "10G";
|
|
|
|
jvmInitialAllocation = "2G";
|
|
|
|
jvmPackage = jre8;
|
|
|
|
jvmOpts = "";
|
2023-12-26 17:10:10 -05:00
|
|
|
|
2023-12-27 00:33:19 -05:00
|
|
|
serverConfig =
|
|
|
|
{
|
|
|
|
server-port = 25569;
|
|
|
|
motd = "Nomi CEu Server, v1.7-alpha-2";
|
2023-12-26 17:10:10 -05:00
|
|
|
|
2023-12-27 00:33:19 -05:00
|
|
|
extra-options = {
|
|
|
|
max-players = 8;
|
|
|
|
difficulty = 1;
|
|
|
|
view-distance = 10;
|
|
|
|
simulation-distance = 10;
|
|
|
|
level-type = "lostcities";
|
|
|
|
};
|
|
|
|
}
|
|
|
|
// defaults;
|
|
|
|
};
|
2023-12-27 15:36:42 -05:00
|
|
|
|
|
|
|
# Vault Hunters
|
|
|
|
vh = {
|
|
|
|
enable = false;
|
|
|
|
|
|
|
|
jvmMaxAllocation = "12G";
|
|
|
|
jvmInitialAllocation = "2G";
|
|
|
|
jvmPackage = jre17;
|
|
|
|
jvmOpts = "";
|
|
|
|
|
2023-12-29 17:37:48 -05:00
|
|
|
serverConfig =
|
|
|
|
{
|
|
|
|
server-port = 25569;
|
|
|
|
motd = "we do a little hunting of the vaults";
|
|
|
|
|
|
|
|
extra-options = {
|
|
|
|
difficulty = "hard";
|
|
|
|
enable-command-block = true;
|
|
|
|
entity-broadcast-range-percentage = 150;
|
|
|
|
level-type = "default";
|
|
|
|
max-players = 8;
|
|
|
|
spawn-protection = 0;
|
|
|
|
sync-chunk-writes = true;
|
|
|
|
use-native-transport = true;
|
|
|
|
view-distance = 10;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
// defaults;
|
2023-12-27 15:36:42 -05:00
|
|
|
};
|
2023-12-26 17:10:10 -05:00
|
|
|
};
|
|
|
|
};
|
2023-12-27 00:33:19 -05:00
|
|
|
|
2023-12-27 11:39:38 -05:00
|
|
|
borgbackup.configs.mc = {
|
|
|
|
paths = [
|
|
|
|
"/var/lib/minecraft"
|
|
|
|
];
|
|
|
|
};
|
2023-12-26 17:10:10 -05:00
|
|
|
};
|
|
|
|
}
|