mirror of
https://codeberg.org/polyteknisk-radiogruppe/the_prg_server_configuration.git
synced 2026-10-21 03:15:46 +02:00
Compare commits
No commits in common. "17be3bdb66869a826da145b35d0c89517386124d" and "02836a213a61a0f3c69533a1f381a9dbb6ce94ac" have entirely different histories.
17be3bdb66
...
02836a213a
2 changed files with 33 additions and 109 deletions
|
|
@ -75,7 +75,7 @@
|
||||||
modules = [
|
modules = [
|
||||||
# Apply the overlay first so pkgs in later modules (like our local
|
# Apply the overlay first so pkgs in later modules (like our local
|
||||||
# `minecraft.nix`) see the extra helpers provided by the overlay
|
# `minecraft.nix`) see the extra helpers provided by the overlay
|
||||||
{nixpkgs.overlays = [inputs.nix-minecraft.overlay];}
|
{ nixpkgs.overlays = [ inputs.nix-minecraft.overlay ]; }
|
||||||
|
|
||||||
nix-minecraft.nixosModules.minecraft-servers
|
nix-minecraft.nixosModules.minecraft-servers
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
# Try to use the nix-minecraft helper if the overlay is present; otherwise
|
# Try to use the nix-minecraft helper if the overlay is present; otherwise
|
||||||
# fall back to a local path. If you use the fallback, ensure the path is an
|
# fall back to a local path. If you use the fallback, ensure the path is an
|
||||||
# unpacked modpack directory with `mods` and `config` subdirectories.
|
# unpacked modpack directory with `mods` and `config` subdirectories.
|
||||||
modpack = /srv/minecraft/modpacks/atm10;
|
modpack = /srv/minecraft/modpacks/AllTheMods10-prg.mrpack;
|
||||||
in {
|
in {
|
||||||
options.local = {
|
options.local = {
|
||||||
hostname = lib.mkOption {
|
hostname = lib.mkOption {
|
||||||
|
|
@ -70,7 +70,7 @@ in {
|
||||||
eula = true;
|
eula = true;
|
||||||
openFirewall = true;
|
openFirewall = true;
|
||||||
|
|
||||||
servers.all-the-mods-tss = {
|
servers.all-the-mods-ten-tss = {
|
||||||
enable = true;
|
enable = true;
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
restart = "always";
|
restart = "always";
|
||||||
|
|
@ -78,26 +78,8 @@ in {
|
||||||
package = pkgs.neoforgeServers.neoforge-1_21_1-21_1_224;
|
package = pkgs.neoforgeServers.neoforge-1_21_1-21_1_224;
|
||||||
|
|
||||||
jvmOpts = lib.concatStringsSep " " [
|
jvmOpts = lib.concatStringsSep " " [
|
||||||
"-Xms4G"
|
"-Xms18G"
|
||||||
"-Xmx45G"
|
"-Xmx45G"
|
||||||
"-XX:+UseG1GC"
|
|
||||||
"-XX:+ParallelRefProcEnabled"
|
|
||||||
"-XX:MaxGCPauseMillis=200"
|
|
||||||
"-XX:+UnlockExperimentalVMOptions"
|
|
||||||
"-XX:+DisableExplicitGC"
|
|
||||||
"-XX:+AlwaysPreTouch"
|
|
||||||
"-XX:G1NewSizePercent=30"
|
|
||||||
"-XX:G1MaxNewSizePercent=40"
|
|
||||||
"-XX:G1HeapRegionSize=8M"
|
|
||||||
"-XX:G1ReservePercent=20"
|
|
||||||
"-XX:G1HeapWastePercent=5"
|
|
||||||
"-XX:G1MixedGCCountTarget=4"
|
|
||||||
"-XX:InitiatingHeapOccupancyPercent=15"
|
|
||||||
"-XX:G1MixedGCLiveThresholdPercent=90"
|
|
||||||
"-XX:G1RSetUpdatingPauseTimePercent=5"
|
|
||||||
"-XX:SurvivorRatio=32"
|
|
||||||
"-XX:+PerfDisableSharedMem"
|
|
||||||
"-XX:MaxTenuringThreshold=1"
|
|
||||||
];
|
];
|
||||||
|
|
||||||
serverProperties = {
|
serverProperties = {
|
||||||
|
|
@ -115,57 +97,7 @@ in {
|
||||||
enable-command-block = false;
|
enable-command-block = false;
|
||||||
enable-rcon = false;
|
enable-rcon = false;
|
||||||
require-resource-pack = false;
|
require-resource-pack = false;
|
||||||
level-type = "minecraft:amplified";
|
|
||||||
level-seed = "-2032795982907864146";
|
level-seed = "-2032795982907864146";
|
||||||
|
|
||||||
# Added properties (do not overwrite existing ones above)
|
|
||||||
accepts-transfers = false;
|
|
||||||
allow-flight = true;
|
|
||||||
allow-nether = true;
|
|
||||||
broadcast-console-to-ops = true;
|
|
||||||
broadcast-rcon-to-ops = true;
|
|
||||||
bug-report-link = "";
|
|
||||||
enable-jmx-monitoring = false;
|
|
||||||
enable-query = false;
|
|
||||||
enable-status = true;
|
|
||||||
enforce-whitelist = false;
|
|
||||||
entity-broadcast-range-percentage = 100;
|
|
||||||
force-gamemode = false;
|
|
||||||
function-permission-level = 2;
|
|
||||||
generate-structures = true;
|
|
||||||
hardcore = false;
|
|
||||||
hide-online-players = false;
|
|
||||||
initial-disabled-packs = "";
|
|
||||||
initial-enabled-packs = "vanilla";
|
|
||||||
level-name = "world";
|
|
||||||
log-ips = true;
|
|
||||||
max-chained-neighbor-updates = 1000000;
|
|
||||||
max-tick-time = 180000;
|
|
||||||
max-world-size = 29999984;
|
|
||||||
network-compression-threshold = 256;
|
|
||||||
op-permission-level = 4;
|
|
||||||
player-idle-timeout = 0;
|
|
||||||
prevent-proxy-connections = false;
|
|
||||||
pvp = true;
|
|
||||||
# dotted keys must be quoted
|
|
||||||
"query.port" = 25566;
|
|
||||||
rate-limit = 0;
|
|
||||||
"rcon.password" = "";
|
|
||||||
"rcon.port" = 25575;
|
|
||||||
region-file-compression = "deflate";
|
|
||||||
resource-pack = "";
|
|
||||||
resource-pack-id = "";
|
|
||||||
resource-pack-prompt = "";
|
|
||||||
resource-pack-sha1 = "";
|
|
||||||
server-ip = "";
|
|
||||||
spawn-animals = true;
|
|
||||||
spawn-monsters = true;
|
|
||||||
spawn-npcs = true;
|
|
||||||
sync-chunk-writes = true;
|
|
||||||
text-filtering-config = "";
|
|
||||||
use-native-transport = true;
|
|
||||||
# white-list, view-distance, simulation-distance, spawn-protection, etc.
|
|
||||||
# were kept above to avoid overwriting existing values.
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# Grant operator privileges to the user with the given UUID.
|
# Grant operator privileges to the user with the given UUID.
|
||||||
|
|
@ -178,20 +110,34 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
symlinks = {
|
#symlinks = {
|
||||||
"mods" = "${modpack}/mods";
|
# "mods" = "${modpack}/overrides/mods";
|
||||||
"datapacks" = "${modpack}/datapacks";
|
# "moddata" = "${modpack}/overrides/moddata";
|
||||||
"user_jvm_args.txt" = "${modpack}/user_jvm_args.txt";
|
# "resourcepacks" = "${modpack}/overrides/resourcepacks";
|
||||||
};
|
# "shaderpacks" = "${modpack}/overrides/shaderpacks";
|
||||||
files = {
|
# "dynamic-resource-pack-cache" = "${modpack}/overrides/dynamic-resource-pack-cache";
|
||||||
"config" = "${modpack}/config";
|
# "dynamic-data-pack-cache" = "${modpack}/overrides/dynamic-data-pack-cache";
|
||||||
"patchouli_books" = "${modpack}/patchouli_books";
|
#};
|
||||||
"defaultconfigs" = "${modpack}/defaultconfigs";
|
#files = {
|
||||||
"kubejs" = "${modpack}/kubejs";
|
# "backup" = "${modpack}/overrides/backup";
|
||||||
"local" = "${modpack}/local";
|
# "blueprints" = "${modpack}/overrides/blueprints";
|
||||||
".mixin.out" = "${modpack}/.mixin.out";
|
# "command_history.txt" = "${modpack}/overrides/command_history.txt";
|
||||||
"dynamic-data-pack-cache" = "${modpack}/dynamic-data-pack-cache";
|
# "config" = "${modpack}/overrides/config";
|
||||||
};
|
# "datapacks" = "${modpack}/overrides/datapacks";
|
||||||
|
# "downloads" = "${modpack}/overrides/downloads";
|
||||||
|
# "ESM" = "${modpack}/overrides/ESM";
|
||||||
|
# "eula.txt" = "${modpack}/overrides/eula.txt";
|
||||||
|
# "fancymenu_data" = "${modpack}/overrides/fancymenu_data";
|
||||||
|
# "journeymap" = "${modpack}/overrides/journeymap";
|
||||||
|
# "kubejs" = "${modpack}/overrides/kubejs";
|
||||||
|
# "manifest.json" = "${modpack}/overrides/manifest.json";
|
||||||
|
# "minecraftinstance.json" = "${modpack}/overrides/minecraftinstance.json";
|
||||||
|
# "observable_announce" = "${modpack}/overrides/observable_announce";
|
||||||
|
# "options.txt" = "${modpack}/overrides/options.txt";
|
||||||
|
# "patchouli_books" = "${modpack}/overrides/patchouli_books";
|
||||||
|
# "patchouli_data.json" = "${modpack}/overrides/patchouli_data.json";
|
||||||
|
# "schematics" = "${modpack}/overrides/schematics";
|
||||||
|
#};
|
||||||
};
|
};
|
||||||
|
|
||||||
servers.fabric-modded = {
|
servers.fabric-modded = {
|
||||||
|
|
@ -489,32 +435,10 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# For FastBackup and to force OpenJDK 21 for the Minecraft services,
|
# For FastBackup force etc to have PATH
|
||||||
# set JAVA_HOME and include the OpenJDK bin in the service environment.
|
|
||||||
# Add matching environment for both server units created by nix-minecraft.
|
|
||||||
systemd.services."minecraft-server-fabric-modded".environment = {
|
systemd.services."minecraft-server-fabric-modded".environment = {
|
||||||
JAVA_HOME = lib.mkForce "${pkgs.openjdk21}";
|
|
||||||
PATH = lib.mkForce (
|
PATH = lib.mkForce (
|
||||||
lib.makeBinPath [
|
lib.makeBinPath [
|
||||||
pkgs.openjdk21
|
|
||||||
pkgs.git
|
|
||||||
pkgs.git-lfs
|
|
||||||
pkgs.coreutils
|
|
||||||
pkgs.findutils
|
|
||||||
pkgs.gnugrep
|
|
||||||
pkgs.gnused
|
|
||||||
pkgs.systemd
|
|
||||||
]
|
|
||||||
+ ":/run/current-system/sw/bin"
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
# Ensure the other server unit also uses OpenJDK 21
|
|
||||||
systemd.services."minecraft-server-all-the-mods-tss".environment = {
|
|
||||||
JAVA_HOME = lib.mkForce "${pkgs.openjdk21}";
|
|
||||||
PATH = lib.mkForce (
|
|
||||||
lib.makeBinPath [
|
|
||||||
pkgs.openjdk21
|
|
||||||
pkgs.git
|
pkgs.git
|
||||||
pkgs.git-lfs
|
pkgs.git-lfs
|
||||||
pkgs.coreutils
|
pkgs.coreutils
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue