fix: wowmine: caches
This commit is contained in:
@@ -1,13 +1,18 @@
|
||||
{ pkgs, serverDir }:
|
||||
{ pkgs, serverDir, namesOnly ? false }:
|
||||
''
|
||||
${pkgs.lib.optionalString (!namesOnly) ''
|
||||
rm -f -- \
|
||||
"${serverDir}/mods/dynamicheight-0.2.0+neoforge-1.21-1.21.1.jar" \
|
||||
"${serverDir}/mods/sable_dynamicheight_compat-1.0.0.jar"
|
||||
''}
|
||||
${pkgs.gnused}/bin/sed -i \
|
||||
-e '/^[[:space:]]*levelKeyPrefix[[:space:]]*=/d' \
|
||||
-e '/^\[server\]$/a\levelKeyPrefix = "world-of-sosal-20261114T223938Z-winter-biomes-"' \
|
||||
-e '/^[[:space:]]*serverKey[[:space:]]*=/d' \
|
||||
-e '/^\[server\]$/a\levelKeyPrefix = "wos-w1"\nserverKey = "wos"' \
|
||||
"${serverDir}/config/DistantHorizons.toml"
|
||||
${pkgs.lib.optionalString (!namesOnly) ''
|
||||
${pkgs.gnused}/bin/sed -i \
|
||||
-e 's/^\([[:space:]]*enableCheatModeForCreative[[:space:]]*=\).*/\1 false/' \
|
||||
"${serverDir}/config/jei-server.toml"
|
||||
''}
|
||||
''
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
let
|
||||
packVersion = "v13-lootplus-cleanup";
|
||||
serverDir = "${config.services.minecraft-servers.dataDir}/wowMineMap";
|
||||
serverMotd = "WoS | Warcraft";
|
||||
in
|
||||
{
|
||||
sops.secrets."minecraft/storage-box-pack-key" = {
|
||||
@@ -29,7 +31,16 @@ in
|
||||
};
|
||||
|
||||
services.minecraft-servers.servers.wowMineMap.serverProperties.motd =
|
||||
"WorldOfSosal ${packVersion} — World of Warcraft";
|
||||
serverMotd;
|
||||
|
||||
systemd.services.minecraft-server-wowMineMap.preStart =
|
||||
(import ./world-of-sosal-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 = {
|
||||
@@ -37,8 +48,7 @@ in
|
||||
requires = [ "minecraft-world-import-wowMineMap.service" ];
|
||||
# Test the map's native dimension height without runtime height overrides.
|
||||
postStart = import ./world-of-sosal-settings.nix {
|
||||
inherit pkgs;
|
||||
serverDir = "${config.services.minecraft-servers.dataDir}/wowMineMap";
|
||||
inherit pkgs serverDir;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user