feat: transfer wowmine to neuro
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
let
|
||||
name = "wowMineMapRestore";
|
||||
production = config.services.minecraft-servers.servers.wowMineMap;
|
||||
pack = config.services.minecraft-modpack-imports.worldOfSosal;
|
||||
pack = config.services.minecraft-modpack-imports.wowmine;
|
||||
restore = config.services.minecraft-backup-restores.${name};
|
||||
serverDir = "${config.services.minecraft-servers.dataDir}/${name}";
|
||||
in {
|
||||
@@ -29,7 +29,7 @@ in {
|
||||
enable-query = false;
|
||||
view-distance = 8;
|
||||
simulation-distance = 4;
|
||||
motd = "WorldOfSosal backup restore test";
|
||||
motd = "wowmine backup restore test";
|
||||
};
|
||||
};
|
||||
|
||||
@@ -43,7 +43,7 @@ in {
|
||||
|
||||
systemd.services."minecraft-modpack-import-${name}" = {
|
||||
unitConfig.ConditionPathExists = "!${restore.completionMarker}";
|
||||
postStart = import ./world-of-sosal-settings.nix { inherit pkgs serverDir; };
|
||||
postStart = import ./wowmine-settings.nix { inherit pkgs serverDir; };
|
||||
};
|
||||
|
||||
services.minecraft-backup-restores.${name} = {
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
{ config, pkgs, ... }:
|
||||
let
|
||||
serverDir = "${config.services.minecraft-servers.dataDir}/wowMineMap";
|
||||
stateDir = "/var/lib/worldofsosal-bluemap";
|
||||
stateDir = "/var/lib/wowmine-bluemap";
|
||||
diskCheck = "${pkgs.coreutils}/bin/test $(${pkgs.coreutils}/bin/df -B1 --output=avail ${stateDir} | ${pkgs.coreutils}/bin/tail -n1) -ge 21474836480";
|
||||
jar = pkgs.fetchurl {
|
||||
url = "https://github.com/BlueMap-Minecraft/BlueMap/releases/download/v5.29/bluemap-5.29-cli.jar";
|
||||
sha256 = "e830767fa6364b52b9310fb598508ebde7eec5ebe8360a989e240d991af89a3a";
|
||||
};
|
||||
in {
|
||||
systemd.services.worldofsosal-bluemap = {
|
||||
description = "WorldOfSosal live Azeroth and Outland 3D maps";
|
||||
systemd.services.wowmine-bluemap = {
|
||||
description = "wowmine live Azeroth and Outland 3D maps";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
wants = [ "network-online.target" ];
|
||||
after = [ "network-online.target" "minecraft-server-wowMineMap.service" ];
|
||||
@@ -21,7 +21,7 @@ in {
|
||||
serviceConfig = {
|
||||
User = "minecraft";
|
||||
Group = "minecraft";
|
||||
StateDirectory = "worldofsosal-bluemap";
|
||||
StateDirectory = "wowmine-bluemap";
|
||||
StateDirectoryMode = "0750";
|
||||
WorkingDirectory = stateDir;
|
||||
ExecCondition = "${pkgs.runtimeShell} -ec '${builtins.replaceStrings [ "$" ] [ "$$" ] diskCheck}'";
|
||||
@@ -47,17 +47,17 @@ in {
|
||||
TimeoutStopSec = 120;
|
||||
};
|
||||
};
|
||||
systemd.services.worldofsosal-bluemap-space-guard = {
|
||||
systemd.services.wowmine-bluemap-space-guard = {
|
||||
description = "Keep 20 GiB free for Minecraft while rendering maps";
|
||||
serviceConfig.Type = "oneshot";
|
||||
script = ''
|
||||
if ! ${diskCheck}; then
|
||||
echo "Stopping only BlueMap: less than 20 GiB free on map filesystem"
|
||||
${pkgs.systemd}/bin/systemctl stop worldofsosal-bluemap.service
|
||||
${pkgs.systemd}/bin/systemctl stop wowmine-bluemap.service
|
||||
fi
|
||||
'';
|
||||
};
|
||||
systemd.timers.worldofsosal-bluemap-space-guard = {
|
||||
systemd.timers.wowmine-bluemap-space-guard = {
|
||||
wantedBy = [ "timers.target" ];
|
||||
timerConfig = {
|
||||
OnBootSec = "1min";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
accept-download: true
|
||||
data: "/var/lib/worldofsosal-bluemap/data"
|
||||
data: "/var/lib/wowmine-bluemap/data"
|
||||
render-thread-count: 2
|
||||
update-cooldown: 60
|
||||
full-update-interval: 1440
|
||||
@@ -7,6 +7,6 @@ region-file-check-interval: 5
|
||||
scan-for-mod-resources: true
|
||||
metrics: false
|
||||
log: {
|
||||
file: "/var/lib/worldofsosal-bluemap/data/logs/debug.log"
|
||||
file: "/var/lib/wowmine-bluemap/data/logs/debug.log"
|
||||
append: true
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
storage-type: file
|
||||
root: "/var/lib/worldofsosal-bluemap/web/maps"
|
||||
root: "/var/lib/wowmine-bluemap/web/maps"
|
||||
compression: gzip
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
enabled: true
|
||||
webroot: "/var/lib/worldofsosal-bluemap/web"
|
||||
webroot: "/var/lib/wowmine-bluemap/web"
|
||||
update-settings-file: true
|
||||
use-cookies: true
|
||||
default-to-flat-view: false
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
enabled: true
|
||||
webroot: "/var/lib/worldofsosal-bluemap/web"
|
||||
webroot: "/var/lib/wowmine-bluemap/web"
|
||||
ip: "127.0.0.1"
|
||||
port: 8100
|
||||
sse-enabled: true
|
||||
@@ -8,6 +8,6 @@ additional-headers: {
|
||||
"X-Content-Type-Options": "nosniff"
|
||||
}
|
||||
log: {
|
||||
file: "/var/lib/worldofsosal-bluemap/data/logs/webserver.log"
|
||||
file: "/var/lib/wowmine-bluemap/data/logs/webserver.log"
|
||||
append: true
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
./horizon.nix
|
||||
./create-aeronautics.nix
|
||||
./wow-mine-map.nix
|
||||
./world-of-sosal.nix
|
||||
./wowmine.nix
|
||||
./bluemap.nix
|
||||
./backup-restore-test.nix
|
||||
./public-tunnel.nix
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
let
|
||||
mkTunnel = relay: {
|
||||
enable = false;
|
||||
description = "WorldOfSosal WoW reverse tunnel to ${relay.name}";
|
||||
description = "wowmine reverse tunnel to ${relay.name}";
|
||||
startLimitIntervalSec = 0;
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
wants = [ "network-online.target" ];
|
||||
|
||||
-3
@@ -1,3 +0,0 @@
|
||||
{
|
||||
"values": ["worldofsosal:spawn_tick"]
|
||||
}
|
||||
-1
@@ -1 +0,0 @@
|
||||
execute as @a[tag=!worldofsosal_initialized] in crafting_azeroth:azeroth run function worldofsosal:first_spawn
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"pack": {
|
||||
"pack_format": 48,
|
||||
"description": "WorldOfSosal: initial spawn in Azeroth"
|
||||
}
|
||||
}
|
||||
@@ -13,8 +13,8 @@
|
||||
serverName = "wowMineMap";
|
||||
remoteHost = "u664722.your-storagebox.de";
|
||||
remoteUser = "u664722";
|
||||
remotePath = "minecraft/map/versions/world-of-sosal-20261114T223938Z-winter-biomes.tar.gz";
|
||||
archiveName = "world-of-sosal-20261114T223938Z-winter-biomes.tar.gz";
|
||||
remotePath = "minecraft/map/versions/wowmine-20261114T223938Z-winter-biomes.tar.gz";
|
||||
archiveName = "wowmine-20261114T223938Z-winter-biomes.tar.gz";
|
||||
cacheDir = "/var/lib/minecraft-maps";
|
||||
archiveSha256 = "d1afd169b16b7b50a57c47da46245e93285b46b6c833bfd08941d07d0341b208";
|
||||
sshKeyFile = config.sops.secrets."minecraft/storage-box-key".path;
|
||||
@@ -23,7 +23,7 @@
|
||||
};
|
||||
|
||||
systemd.services.minecraft-world-reset-wowMineMap = {
|
||||
description = "Reset WorldOfSosal to the pinned source map";
|
||||
description = "Reset wowmine to the pinned source map";
|
||||
path = [ pkgs.coreutils pkgs.systemd ];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
@@ -65,7 +65,7 @@
|
||||
'';
|
||||
enable = true;
|
||||
jvmOpts = "-Xmx24G -Xms2G";
|
||||
# WorldOfSosal client and server use the same pinned NeoForge.
|
||||
# wowmine client and server use the same pinned NeoForge.
|
||||
package = pkgs.minecraftServers.neoforge-1_21_1.override (
|
||||
builtins.fromJSON (builtins.readFile ./neoforge-21.1.250.json)
|
||||
);
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"values": ["wowmine:spawn_tick"]
|
||||
}
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
spawnpoint @s 3742 89 8891
|
||||
tp @s 3742 89 8891
|
||||
tag @s add worldofsosal_initialized
|
||||
tag @s add wowmine_initialized
|
||||
@@ -0,0 +1,3 @@
|
||||
# Compatibility: preserve existing first-join state without teleporting players.
|
||||
tag @a[tag=worldofsosal_initialized,tag=!wowmine_initialized] add wowmine_initialized
|
||||
execute as @a[tag=!wowmine_initialized] in crafting_azeroth:azeroth run function wowmine:first_spawn
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"pack": {
|
||||
"pack_format": 48,
|
||||
"description": "wowmine: initial spawn in Azeroth"
|
||||
}
|
||||
}
|
||||
+13
-16
@@ -1,27 +1,27 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
packVersion = "v13-lootplus-cleanup";
|
||||
packVersion = "v15-wowmine";
|
||||
serverDir = "${config.services.minecraft-servers.dataDir}/wowMineMap";
|
||||
serverMotd = "WoS | Warcraft";
|
||||
serverMotd = "wowmine | Warcraft";
|
||||
in
|
||||
{
|
||||
sops.secrets."minecraft/storage-box-pack-key" = {
|
||||
sopsFile = ../../../../sus/neuro-minecraft.yaml;
|
||||
owner = "mc-pack-worldOfSosal";
|
||||
group = "mc-pack-worldOfSosal";
|
||||
owner = "mc-pack-wowmine";
|
||||
group = "mc-pack-wowmine";
|
||||
mode = "0400";
|
||||
};
|
||||
|
||||
services.minecraft-modpack-imports.worldOfSosal = {
|
||||
services.minecraft-modpack-imports.wowmine = {
|
||||
enable = true;
|
||||
serverName = "wowMineMap";
|
||||
remoteHost = "u664722.your-storagebox.de";
|
||||
remoteUser = "u664722";
|
||||
remotePath = "minecraft/pack/WorldOfSosal-${packVersion}.mrpack";
|
||||
archiveName = "WorldOfSosal.mrpack";
|
||||
cacheDir = "/var/lib/minecraft-modpacks/worldOfSosal";
|
||||
archiveSha256 = "e5895994e95a4df476d7da00b53c39d0372885265acb6cf9b5a9647a015db5f7";
|
||||
remotePath = "minecraft/pack/wowmine-${packVersion}.mrpack";
|
||||
archiveName = "wowmine.mrpack";
|
||||
cacheDir = "/var/lib/minecraft-modpacks/wowmine";
|
||||
archiveSha256 = "6c97a4b3c5f82c055b7de4ebfbda84ab941a55128753485eadd47e8266ec3b43";
|
||||
expectedDependencies = {
|
||||
minecraft = "1.21.1";
|
||||
neoforge = "21.1.250";
|
||||
@@ -34,20 +34,17 @@ in
|
||||
serverMotd;
|
||||
|
||||
systemd.services.minecraft-server-wowMineMap.preStart =
|
||||
(import ./world-of-sosal-settings.nix {
|
||||
import ./wowmine-settings.nix {
|
||||
inherit pkgs serverDir;
|
||||
namesOnly = true;
|
||||
}) + ''
|
||||
${pkgs.gnused}/bin/sed -i \
|
||||
's/^motd=.*/motd=${serverMotd}/' "${serverDir}/server.properties"
|
||||
'';
|
||||
};
|
||||
|
||||
# Import the map before writing modpack configuration into the same server.
|
||||
systemd.services.minecraft-modpack-import-worldOfSosal = {
|
||||
systemd.services.minecraft-modpack-import-wowmine = {
|
||||
after = [ "minecraft-world-import-wowMineMap.service" ];
|
||||
requires = [ "minecraft-world-import-wowMineMap.service" ];
|
||||
# Test the map's native dimension height without runtime height overrides.
|
||||
postStart = import ./world-of-sosal-settings.nix {
|
||||
postStart = import ./wowmine-settings.nix {
|
||||
inherit pkgs serverDir;
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user