feat: add sead and icon and mod changes

This commit is contained in:
Jet Pham 2026-03-14 14:28:27 -07:00 committed by Jet
parent 113888b22b
commit 7576c1636e
7 changed files with 38 additions and 5 deletions

View file

@ -12,6 +12,8 @@ in
# minecraft.compsigh.club → redirect to git repo
"${domain}" = {
extraConfig = ''
redir /terms ${gitRepo}/blob/main/terms.txt permanent
redir /privacy ${gitRepo}/blob/main/privacy.txt permanent
redir ${gitRepo} permanent
'';
};

View file

@ -27,11 +27,17 @@ in
"channelId": "1482486447591391285",
"consoleLogChannelId": "1482487413153464330",
"useWebhook": true,
"updateChannelTopic": true,
"channelTopicUpdateInterval": 300000,
"allowedMentions": ["users", "roles"],
"broadcastPlayerCommandExecution": false,
"announceServerStartStop": true,
"announcePlayerJoinLeave": true,
"announceDeathMessages": true,
"announceAdvancements": true,
"broadcastChatMessages": true,
"notifyUpdates": false,
"mentionAdminsForUpdates": false,
"adminsIds": [
"1008533670426050704",
"839601350865584158",

View file

@ -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