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
|
|
@ -38,4 +38,10 @@
|
||||||
group = "grafana";
|
group = "grafana";
|
||||||
mode = "0400";
|
mode = "0400";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
age.secrets.minecraft-seed = {
|
||||||
|
file = ./secrets/minecraft-seed.age;
|
||||||
|
owner = "root";
|
||||||
|
mode = "0400";
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,8 @@ in
|
||||||
# minecraft.compsigh.club → redirect to git repo
|
# minecraft.compsigh.club → redirect to git repo
|
||||||
"${domain}" = {
|
"${domain}" = {
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
|
redir /terms ${gitRepo}/blob/main/terms.txt permanent
|
||||||
|
redir /privacy ${gitRepo}/blob/main/privacy.txt permanent
|
||||||
redir ${gitRepo} permanent
|
redir ${gitRepo} permanent
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -27,11 +27,17 @@ in
|
||||||
"channelId": "1482486447591391285",
|
"channelId": "1482486447591391285",
|
||||||
"consoleLogChannelId": "1482487413153464330",
|
"consoleLogChannelId": "1482487413153464330",
|
||||||
"useWebhook": true,
|
"useWebhook": true,
|
||||||
|
"updateChannelTopic": true,
|
||||||
|
"channelTopicUpdateInterval": 300000,
|
||||||
|
"allowedMentions": ["users", "roles"],
|
||||||
|
"broadcastPlayerCommandExecution": false,
|
||||||
"announceServerStartStop": true,
|
"announceServerStartStop": true,
|
||||||
"announcePlayerJoinLeave": true,
|
"announcePlayerJoinLeave": true,
|
||||||
"announceDeathMessages": true,
|
"announceDeathMessages": true,
|
||||||
"announceAdvancements": true,
|
"announceAdvancements": true,
|
||||||
"broadcastChatMessages": true,
|
"broadcastChatMessages": true,
|
||||||
|
"notifyUpdates": false,
|
||||||
|
"mentionAdminsForUpdates": false,
|
||||||
"adminsIds": [
|
"adminsIds": [
|
||||||
"1008533670426050704",
|
"1008533670426050704",
|
||||||
"839601350865584158",
|
"839601350865584158",
|
||||||
|
|
|
||||||
|
|
@ -51,10 +51,12 @@ let
|
||||||
# QoL
|
# QoL
|
||||||
"oneplayersleep"
|
"oneplayersleep"
|
||||||
"netherportalfix"
|
"netherportalfix"
|
||||||
|
"blossomlib"
|
||||||
|
"blossomtpa"
|
||||||
|
"double-shulker-shell-drops"
|
||||||
|
"afkplus"
|
||||||
|
|
||||||
# Moderation
|
# Moderation
|
||||||
"luckperms"
|
|
||||||
"banhammer"
|
|
||||||
"ledger"
|
"ledger"
|
||||||
"styled-chat"
|
"styled-chat"
|
||||||
|
|
||||||
|
|
@ -103,15 +105,19 @@ in
|
||||||
MEMORY = "2560M";
|
MEMORY = "2560M";
|
||||||
MAX_PLAYERS = "10";
|
MAX_PLAYERS = "10";
|
||||||
DIFFICULTY = "hard";
|
DIFFICULTY = "hard";
|
||||||
|
PVP = "FALSE";
|
||||||
VIEW_DISTANCE = "10";
|
VIEW_DISTANCE = "10";
|
||||||
SIMULATION_DISTANCE = "10";
|
SIMULATION_DISTANCE = "10";
|
||||||
ENABLE_WHITELIST = "TRUE";
|
ENABLE_WHITELIST = "TRUE";
|
||||||
ENFORCE_WHITELIST = "TRUE";
|
ENFORCE_WHITELIST = "TRUE";
|
||||||
WHITELIST = "jetpham";
|
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;
|
MODRINTH_PROJECTS = modrinthMods;
|
||||||
JVM_XX_OPTS = jvmFlags;
|
JVM_XX_OPTS = jvmFlags;
|
||||||
};
|
};
|
||||||
|
environmentFiles = [ "/run/minecraft-seed.env" ];
|
||||||
extraOptions = [
|
extraOptions = [
|
||||||
"--memory=3g"
|
"--memory=3g"
|
||||||
"--cpus=2"
|
"--cpus=2"
|
||||||
|
|
@ -126,14 +132,26 @@ in
|
||||||
"d ${mcDataDir} 0755 root root -"
|
"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 = {
|
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" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
before = [ "docker-minecraft.service" ];
|
before = [ "docker-minecraft.service" ];
|
||||||
|
after = [ "agenix.service" ];
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
ExecStart = pkgs.writeShellScript "setup-mod-configs" ''
|
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
|
mkdir -p ${mcDataDir}/plugins/Chunky
|
||||||
cp ${../configs/chunky.yml} ${mcDataDir}/plugins/Chunky/config.yml
|
cp ${../configs/chunky.yml} ${mcDataDir}/plugins/Chunky/config.yml
|
||||||
|
|
||||||
|
|
|
||||||
BIN
secrets/minecraft-seed.age
Normal file
BIN
secrets/minecraft-seed.age
Normal file
Binary file not shown.
|
|
@ -9,4 +9,5 @@ in
|
||||||
"b2-application-key.age".publicKeys = [ server admin ];
|
"b2-application-key.age".publicKeys = [ server admin ];
|
||||||
"grafana-admin-password.age".publicKeys = [ server admin ];
|
"grafana-admin-password.age".publicKeys = [ server admin ];
|
||||||
"grafana-secret-key.age".publicKeys = [ server admin ];
|
"grafana-secret-key.age".publicKeys = [ server admin ];
|
||||||
|
"minecraft-seed.age".publicKeys = [ server admin ];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
BIN
server-icon.png
Normal file
BIN
server-icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 601 B |
Loading…
Add table
Add a link
Reference in a new issue