introduce lib.rad-dev.mapAttrsToString, fix mc-router
Signed-off-by: ahuston-0 <aliceghuston@gmail.com>
This commit is contained in:
@ -21,7 +21,7 @@ let
|
||||
USE_AIKAR_FLAGS = "true";
|
||||
MEMORY = "8GB";
|
||||
ALLOW_FLIGHT = "true";
|
||||
MAX_TICK_TIME = -1;
|
||||
MAX_TICK_TIME = "-1";
|
||||
};
|
||||
|
||||
defaultOptions = [
|
||||
@ -32,7 +32,7 @@ let
|
||||
];
|
||||
in
|
||||
{
|
||||
virtualisation.oci-containers = {
|
||||
virtualisation.oci-containers.containers = {
|
||||
mc-router = {
|
||||
image = "itzg/mc-router:latest";
|
||||
extraOptions = [
|
||||
@ -40,9 +40,12 @@ in
|
||||
"--network=haproxy-net"
|
||||
"--network=minecraft-net"
|
||||
];
|
||||
command =
|
||||
"--mapping=mc.alicehuston.xyz=${defaultServer}:25565"
|
||||
+ (lib.mapAttrs (hostname: url: ",${url}=${hostname}:25565") servers);
|
||||
cmd = [
|
||||
(
|
||||
"--mapping=mc.alicehuston.xyz=${defaultServer}:25565"
|
||||
+ (lib.rad-dev.mapAttrsToString (hostname: url: "," + url + "=" + hostname + ":25565") servers)
|
||||
)
|
||||
];
|
||||
};
|
||||
rlcraft = {
|
||||
image = "itzg/minecraft-server:java8";
|
||||
|
Reference in New Issue
Block a user