mirror of
https://codeberg.org/polyteknisk-radiogruppe/the_prg_server_configuration.git
synced 2026-06-13 18:28:55 +02:00
Add AllTheMods10 modpack and configure additional server settings
This commit is contained in:
parent
bafafa33e0
commit
497dfe1a6b
2 changed files with 83 additions and 6 deletions
|
|
@ -7,6 +7,12 @@
|
|||
choose = paths: builtins.head (builtins.filter (p: builtins.pathExists p) paths);
|
||||
# Domain and Cloudflare DDNS records configured here. Update this list to add/remove records.
|
||||
domain = "prg-radio.org";
|
||||
modpack = pkgs.fetchModrinthModpack {
|
||||
# Get file from local system
|
||||
src = /srv/minecraft/modpacks/AllTheMods10-prg.mrpack;
|
||||
packHash = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=";
|
||||
side = "server";
|
||||
};
|
||||
in {
|
||||
options.local = {
|
||||
hostname = lib.mkOption {
|
||||
|
|
@ -48,8 +54,8 @@ in {
|
|||
|
||||
services.tailscale.enable = true;
|
||||
|
||||
networking.firewall.allowedTCPPorts = [25565 24454 8100 19132];
|
||||
networking.firewall.allowedUDPPorts = [25565 24454 8100 19132];
|
||||
networking.firewall.allowedTCPPorts = [25565 25566 24454 8100 19132];
|
||||
networking.firewall.allowedUDPPorts = [25565 25566 24454 8100 19132];
|
||||
|
||||
# 24454 - https://modrepo.de/minecraft/voicechat/wiki/server_setup_self_hosted !!!
|
||||
# This is the VoiceChat mod in Minecraft
|
||||
|
|
@ -66,6 +72,70 @@ in {
|
|||
eula = true;
|
||||
openFirewall = true;
|
||||
|
||||
servers.all-the-mods-ten = {
|
||||
enable = true;
|
||||
autoStart = true;
|
||||
restart = "always";
|
||||
|
||||
package = pkgs.neoforgeServers.neoforge;
|
||||
|
||||
jvmOpts = lib.concatStringsSep " " [
|
||||
"-Xms28G"
|
||||
# Use 120GB of RA
|
||||
"-Xmx32G"
|
||||
|
||||
"-XX:+UseG1GC"
|
||||
"-XX:+ParallelRefProcEnabled"
|
||||
"-XX:MaxGCPauseMillis=80"
|
||||
"-XX:+UnlockExperimentalVMOptions"
|
||||
"-XX:+DisableExplicitGC"
|
||||
"-XX:+AlwaysPreTouch"
|
||||
"-XX:G1NewSizePercent=30"
|
||||
"-XX:G1MaxNewSizePercent=50"
|
||||
"-XX:G1HeapRegionSize=16M"
|
||||
"-XX:G1ReservePercent=20"
|
||||
"-XX:G1MixedGCCountTarget=4"
|
||||
"-XX:InitiatingHeapOccupancyPercent=15"
|
||||
"-XX:G1MixedGCLiveThresholdPercent=90"
|
||||
"-XX:G1RSetUpdatingPauseTimePercent=5"
|
||||
];
|
||||
|
||||
serverProperties = {
|
||||
server-port = 25566;
|
||||
motd = "PRG Fabric Modded Server";
|
||||
difficulty = "hard";
|
||||
gamemode = "survival";
|
||||
max-players = 64;
|
||||
online-mode = true;
|
||||
white-list = false;
|
||||
spawn-protection = 0;
|
||||
view-distance = 9;
|
||||
simulation-distance = 3;
|
||||
enforce-secure-profile = false;
|
||||
enable-command-block = false;
|
||||
enable-rcon = false;
|
||||
require-resource-pack = false;
|
||||
level-seed = "-2032795982907864146";
|
||||
};
|
||||
|
||||
# Grant operator privileges to the user with the given UUID.
|
||||
# Update `name` to the player's Minecraft username if you know it.
|
||||
operators = {
|
||||
username1 = {
|
||||
uuid = "5e52c4ba-9b1a-469b-8f68-b9d684eae31d";
|
||||
level = 4; # 4 = highest permission (operator)
|
||||
bypassesPlayerLimit = true;
|
||||
};
|
||||
};
|
||||
|
||||
symlinks = {
|
||||
"mods" = "${modpack}/mods";
|
||||
};
|
||||
files = {
|
||||
"config" = "${modpack}/config";
|
||||
};
|
||||
};
|
||||
|
||||
servers.fabric-modded = {
|
||||
enable = true;
|
||||
autoStart = true;
|
||||
|
|
@ -106,7 +176,7 @@ in {
|
|||
white-list = false;
|
||||
spawn-protection = 0;
|
||||
view-distance = 9;
|
||||
simulation-distance = 4;
|
||||
simulation-distance = 3;
|
||||
enforce-secure-profile = false;
|
||||
enable-command-block = false;
|
||||
enable-rcon = false;
|
||||
|
|
@ -286,7 +356,6 @@ in {
|
|||
sha512 = "a9f673fac1f6f554b7394168cbe726f1a15eb2bbef1b65b3c9979853af8de70bf13a457c88ebdc30b955a071d519e86c631cdbf1dd39cdab7c73b9c2d7f165e1";
|
||||
};
|
||||
|
||||
|
||||
AddCollective = pkgs.fetchurl {
|
||||
url = "https://cdn.modrinth.com/data/e0M1UDsY/versions/T8rv7kwo/collective-1.21.11-8.13.jar";
|
||||
sha512 = "af145a48ac89346c7b1ffa8c44400a91a9908e4d1df0f6f1a603ff045b1fd82d9aa041aea27a682c196b266c0daf84cb5b7b8d83b07ee53e2bc1a5c210d19a1b";
|
||||
|
|
|
|||
|
|
@ -305,6 +305,9 @@ in {
|
|||
minecraft = {
|
||||
address = "[::]:25565";
|
||||
};
|
||||
minecraft_modded = {
|
||||
address = "[::]:25566";
|
||||
};
|
||||
|
||||
# Minecraft Bedrock (default port 19132) - expose both TCP and UDP
|
||||
minecraft-bedrock-tcp = {address = "[::]:19132";};
|
||||
|
|
@ -663,6 +666,11 @@ in {
|
|||
{address = "10.1.1.244:25565";}
|
||||
];
|
||||
};
|
||||
minecraft_modded.loadBalancer = {
|
||||
servers = [
|
||||
{address = "10.1.1.244:25566";}
|
||||
];
|
||||
};
|
||||
|
||||
# TCP service for Minecraft Bedrock
|
||||
minecraft-bedrock-tcp.loadBalancer = {
|
||||
|
|
@ -1041,8 +1049,8 @@ in {
|
|||
};
|
||||
|
||||
# Allow common HTTP/S and control ports,
|
||||
networking.firewall.allowedTCPPorts = [80 443 10022 30033 8448 9001 3001 993 465 25 25565 24454 2456 2457 2458 26000 1234 3979 2022 19132];
|
||||
networking.firewall.allowedUDPPorts = [80 443 9987 9001 3001 993 465 25 25565 24454 2022 2456 2457 2458 26000 1234 3979 2022 19132];
|
||||
networking.firewall.allowedTCPPorts = [80 443 10022 30033 8448 9001 3001 993 465 25 25565 25566 24454 2456 2457 2458 26000 1234 3979 2022 19132];
|
||||
networking.firewall.allowedUDPPorts = [80 443 9987 9001 3001 993 465 25 25565 25566 24454 2022 2456 2457 2458 26000 1234 3979 2022 19132];
|
||||
|
||||
system.stateVersion = "25.11";
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue