2023-12-26 17:10:10 -05:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
nms,
|
|
|
|
pkgs,
|
|
|
|
...
|
2024-01-09 13:13:04 -05:00
|
|
|
}: let
|
|
|
|
inherit (config.vars) mainUser;
|
|
|
|
in {
|
2023-12-26 17:10:10 -05:00
|
|
|
imports = [nms.nixosModules.default];
|
|
|
|
|
2024-01-30 21:04:11 -05:00
|
|
|
environment.systemPackages = [
|
|
|
|
config.customPkgs.curseforge-server-downloader
|
|
|
|
];
|
|
|
|
|
2024-01-30 23:27:48 -05:00
|
|
|
systemd.services.mc-steampunk.path = with pkgs; [curl];
|
|
|
|
|
2023-12-27 00:33:19 -05:00
|
|
|
services = {
|
2024-01-04 03:39:14 -05:00
|
|
|
borgbackup.configs.mc = {
|
|
|
|
paths = ["/var/lib/minecraft"];
|
2024-02-19 10:29:07 -05:00
|
|
|
startAt = "01/3:00";
|
2024-01-04 03:39:14 -05:00
|
|
|
};
|
|
|
|
|
2023-12-27 00:33:19 -05:00
|
|
|
modded-minecraft-servers = {
|
|
|
|
eula = true;
|
2024-01-09 13:13:04 -05:00
|
|
|
user = mainUser;
|
2023-12-26 17:10:10 -05:00
|
|
|
|
2023-12-27 00:33:19 -05:00
|
|
|
instances = let
|
|
|
|
jre17 = pkgs.temurin-bin-17;
|
2024-01-30 23:27:48 -05:00
|
|
|
jre18 = pkgs.temurin-bin-18;
|
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 = {
|
2024-02-18 17:51:17 -05:00
|
|
|
enable = false;
|
2023-12-26 17:10:10 -05:00
|
|
|
|
2023-12-27 00:33:19 -05:00
|
|
|
jvmMaxAllocation = "6G";
|
|
|
|
jvmInitialAllocation = "2G";
|
2024-02-18 17:51:17 -05:00
|
|
|
jvmPackage = jre18;
|
2023-12-27 00:33:19 -05:00
|
|
|
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;
|
2024-02-18 17:51:17 -05:00
|
|
|
enforce-white-list = true;
|
2023-12-27 00:33:19 -05:00
|
|
|
gamemode = "creative";
|
|
|
|
max-players = 6;
|
|
|
|
view-distance = 16;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
// defaults;
|
|
|
|
};
|
2023-12-26 17:10:10 -05:00
|
|
|
|
2024-01-30 21:04:11 -05:00
|
|
|
# Modded https://www.curseforge.com/minecraft/modpacks/steam-punk
|
|
|
|
# curseforge-server-downloader --pack 643605 --version latest
|
|
|
|
steampunk = {
|
2024-01-30 23:27:48 -05:00
|
|
|
enable = true;
|
2023-12-26 17:10:10 -05:00
|
|
|
|
2024-01-30 21:04:11 -05:00
|
|
|
jvmMaxAllocation = "12G";
|
2023-12-27 00:33:19 -05:00
|
|
|
jvmInitialAllocation = "2G";
|
2024-01-30 23:27:48 -05:00
|
|
|
jvmPackage = jre18;
|
2023-12-27 00:33:19 -05:00
|
|
|
jvmOpts = "";
|
2023-12-26 17:10:10 -05:00
|
|
|
|
2023-12-27 00:33:19 -05:00
|
|
|
serverConfig =
|
|
|
|
{
|
|
|
|
server-port = 25569;
|
2024-01-30 21:04:11 -05:00
|
|
|
motd = "";
|
2023-12-26 17:10:10 -05:00
|
|
|
|
2023-12-27 00:33:19 -05:00
|
|
|
extra-options = {
|
2024-01-30 21:04:11 -05:00
|
|
|
allow-nether = true;
|
|
|
|
enable-command-block = true;
|
|
|
|
enable-status = true;
|
|
|
|
entity-broadcast-range-percentage = 100;
|
|
|
|
force-gamemode = false;
|
|
|
|
function-permission-level = 2;
|
|
|
|
gamemode = "survival";
|
|
|
|
generate-structures = true;
|
|
|
|
max-build-height = 256;
|
2023-12-27 00:33:19 -05:00
|
|
|
max-players = 8;
|
2024-01-30 21:04:11 -05:00
|
|
|
difficulty = "normal";
|
|
|
|
view-distance = 12;
|
2023-12-27 00:33:19 -05:00
|
|
|
simulation-distance = 10;
|
2024-01-30 21:04:11 -05:00
|
|
|
sync-chunk-writes = true;
|
|
|
|
use-native-transport = true;
|
2023-12-27 00:33:19 -05:00
|
|
|
};
|
|
|
|
}
|
|
|
|
// defaults;
|
|
|
|
};
|
2023-12-27 15:36:42 -05:00
|
|
|
|
2024-02-18 17:51:17 -05:00
|
|
|
# Modded https://www.curseforge.com/minecraft/modpacks/ultimate-building-modpack
|
|
|
|
# With https://www.curseforge.com/minecraft/mc-mods/bits-and-chisels
|
|
|
|
builder = {
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
jvmMaxAllocation = "6G";
|
|
|
|
jvmInitialAllocation = "2G";
|
|
|
|
jvmPackage = jre18;
|
|
|
|
jvmOpts = "";
|
|
|
|
|
|
|
|
serverConfig =
|
|
|
|
{
|
|
|
|
server-port = 25566;
|
|
|
|
motd = "creative mode gaming with mods";
|
|
|
|
|
|
|
|
extra-options = {
|
|
|
|
generate-structures = false;
|
|
|
|
level-type = "minecraft:flat";
|
|
|
|
difficulty = "hard";
|
|
|
|
enable-command-block = true;
|
|
|
|
enforce-white-list = false;
|
|
|
|
gamemode = "creative";
|
|
|
|
max-players = 6;
|
|
|
|
view-distance = 16;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
// 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
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|