fix: remove unused and prep for digital ocean migration
This commit is contained in:
parent
e5ee1f4701
commit
5dc86407bd
3 changed files with 4 additions and 21 deletions
|
|
@ -1,3 +0,0 @@
|
|||
version: 1
|
||||
language: en
|
||||
concurrency: 1
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
disk = {
|
||||
main = {
|
||||
type = "disk";
|
||||
device = "/dev/sda"; # adjust for your VPS
|
||||
device = "/dev/vda"; # adjust for your VPS
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ in
|
|||
EULA = "TRUE";
|
||||
TYPE = "FABRIC";
|
||||
VERSION = "1.21.11";
|
||||
MEMORY = "2560M";
|
||||
MEMORY = "5120M";
|
||||
MAX_PLAYERS = "10";
|
||||
DIFFICULTY = "hard";
|
||||
PVP = "FALSE";
|
||||
|
|
@ -123,19 +123,18 @@ in
|
|||
};
|
||||
environmentFiles = [ "/run/minecraft-seed.env" ];
|
||||
extraOptions = [
|
||||
"--memory=3g"
|
||||
"--memory=6g"
|
||||
"--cpus=2"
|
||||
"--pids-limit=256"
|
||||
"--security-opt=no-new-privileges"
|
||||
];
|
||||
};
|
||||
|
||||
# Ensure data directory exists
|
||||
# Data directory
|
||||
systemd.tmpfiles.rules = [
|
||||
"d ${mcDataDir} 0755 root root -"
|
||||
];
|
||||
|
||||
# Write seed env file and copy mod configs before container starts
|
||||
systemd.services.minecraft-mod-configs = {
|
||||
description = "Set up mod configs and seed for Minecraft container";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
|
|
@ -146,24 +145,11 @@ in
|
|||
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
|
||||
|
||||
# One-time world reset for 1.21.11 — remove this block after confirming the new world works
|
||||
if [ ! -f ${mcDataDir}/.world-reset-1.21.11 ]; then
|
||||
rm -rf ${mcDataDir}/world
|
||||
touch ${mcDataDir}/.world-reset-1.21.11
|
||||
fi
|
||||
|
||||
# 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
|
||||
|
||||
mkdir -p ${mcDataDir}/config
|
||||
cp ${../configs/anti-xray.toml} ${mcDataDir}/config/anti-xray.toml
|
||||
'';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue