feat: add sead and icon and mod changes
This commit is contained in:
parent
113888b22b
commit
7576c1636e
7 changed files with 38 additions and 5 deletions
|
|
@ -51,10 +51,12 @@ let
|
|||
# QoL
|
||||
"oneplayersleep"
|
||||
"netherportalfix"
|
||||
"blossomlib"
|
||||
"blossomtpa"
|
||||
"double-shulker-shell-drops"
|
||||
"afkplus"
|
||||
|
||||
# Moderation
|
||||
"luckperms"
|
||||
"banhammer"
|
||||
"ledger"
|
||||
"styled-chat"
|
||||
|
||||
|
|
@ -103,15 +105,19 @@ in
|
|||
MEMORY = "2560M";
|
||||
MAX_PLAYERS = "10";
|
||||
DIFFICULTY = "hard";
|
||||
PVP = "FALSE";
|
||||
VIEW_DISTANCE = "10";
|
||||
SIMULATION_DISTANCE = "10";
|
||||
ENABLE_WHITELIST = "TRUE";
|
||||
ENFORCE_WHITELIST = "TRUE";
|
||||
WHITELIST = "jetpham";
|
||||
MOTD = "meet cool people \\u0026\\u0026 build cool things";
|
||||
OPS = "jetpham";
|
||||
MOTD = "meet cool people \\u00A7e\\u0026\\u0026\\u00A7r build cool things";
|
||||
OVERRIDE_ICON = "TRUE";
|
||||
MODRINTH_PROJECTS = modrinthMods;
|
||||
JVM_XX_OPTS = jvmFlags;
|
||||
};
|
||||
environmentFiles = [ "/run/minecraft-seed.env" ];
|
||||
extraOptions = [
|
||||
"--memory=3g"
|
||||
"--cpus=2"
|
||||
|
|
@ -126,14 +132,26 @@ in
|
|||
"d ${mcDataDir} 0755 root root -"
|
||||
];
|
||||
|
||||
# Copy Chunky config (concurrency: 1 for background generation)
|
||||
# Write seed env file and copy mod configs before container starts
|
||||
systemd.services.minecraft-mod-configs = {
|
||||
description = "Copy mod configs into Minecraft data volume";
|
||||
description = "Set up mod configs and seed for Minecraft container";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
before = [ "docker-minecraft.service" ];
|
||||
after = [ "agenix.service" ];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
ExecStart = pkgs.writeShellScript "setup-mod-configs" ''
|
||||
set -euo pipefail
|
||||
|
||||
# Write seed from agenix secret
|
||||
SEED=$(cat ${config.age.secrets.minecraft-seed.path})
|
||||
printf 'SEED=%s\n' "$SEED" > /run/minecraft-seed.env
|
||||
chmod 600 /run/minecraft-seed.env
|
||||
|
||||
# Server icon
|
||||
cp ${../server-icon.png} ${mcDataDir}/server-icon.png
|
||||
|
||||
# Mod configs
|
||||
mkdir -p ${mcDataDir}/plugins/Chunky
|
||||
cp ${../configs/chunky.yml} ${mcDataDir}/plugins/Chunky/config.yml
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue