Add voor-kia modpack with default configuration
This commit is contained in:
parent
ad110fbbea
commit
7ad729f2ca
129 changed files with 14212 additions and 35 deletions
configuration/services
|
@ -54,42 +54,51 @@ in {
|
|||
nixpkgs.config.allowUnfreePredicate = pkg:
|
||||
builtins.elem (pkgs.lib.getName pkg) [ "forge-server" ];
|
||||
|
||||
virtualisation.oci-containers.containers.minecraft-voor-kia =
|
||||
let properties = ./configs/minecraft/voor-kia/server.properties;
|
||||
in {
|
||||
image = "tlaternet/minecraft-voor-kia";
|
||||
virtualisation.oci-containers.containers.minecraft-voor-kia = let
|
||||
properties = ./configs/minecraft/voor-kia/server.properties;
|
||||
icon = ./configs/minecraft/voor-kia/server-icon.png;
|
||||
in {
|
||||
image = "tlaternet/minecraft-voor-kia";
|
||||
|
||||
imageFile = pkgs.dockerTools.buildImage {
|
||||
name = "tlaternet/minecraft-voor-kia";
|
||||
tag = "latest";
|
||||
contents = [
|
||||
(pkgs.local.forge-server.override {
|
||||
jre_headless = pkgs.jdk11_headless;
|
||||
mods = pkgs.local.voor-kia;
|
||||
})
|
||||
];
|
||||
|
||||
config = let
|
||||
# Use the upstream minecraft uid
|
||||
uid = toString config.ids.uids.minecraft;
|
||||
gid = toString config.users.groups.nogroup.gid;
|
||||
in {
|
||||
Cmd = [ "forge-server" ] ++ minecraft-server-args;
|
||||
WorkingDir = "/var/lib/minecraft";
|
||||
Volumes = { "/var/lib/minecraft" = { }; };
|
||||
ExposedPorts = { "25565" = { }; };
|
||||
User = "${uid}:${gid}";
|
||||
};
|
||||
};
|
||||
|
||||
autoStart = false;
|
||||
ports = [ "25565:25565" ];
|
||||
volumes = [
|
||||
"minecraft:/var/lib/minecraft"
|
||||
"${properties}:/var/lib/minecraft/server.properties:ro"
|
||||
"${ops}:/var/lib/minecraft/ops.json:ro"
|
||||
"${whitelist}:/var/lib/minecraft/whitelist.json:ro"
|
||||
"${eula}:/var/lib/minecraft/eula.txt:ro"
|
||||
imageFile = pkgs.dockerTools.buildImage {
|
||||
name = "tlaternet/minecraft-voor-kia";
|
||||
tag = "latest";
|
||||
contents = [
|
||||
(pkgs.local.forge-server.override {
|
||||
jre_headless = pkgs.jdk11_headless;
|
||||
mods = pkgs.local.voor-kia;
|
||||
config = ./configs/minecraft/voor-kia/config;
|
||||
defaultconfigs = ./configs/minecraft/voor-kia/defaultconfigs;
|
||||
})
|
||||
];
|
||||
|
||||
config = let
|
||||
# Use the upstream minecraft uid
|
||||
uid = toString config.ids.uids.minecraft;
|
||||
gid = toString config.users.groups.nogroup.gid;
|
||||
in {
|
||||
Cmd = [ "forge-server" ] ++ minecraft-server-args;
|
||||
WorkingDir = "/var/lib/minecraft";
|
||||
Volumes = {
|
||||
"/var/lib/minecraft" = { };
|
||||
# Required because some things will try to write to /tmp,
|
||||
# which doesn't exist if it's not defined as a volume.
|
||||
"/tmp" = { };
|
||||
};
|
||||
ExposedPorts = { "25565" = { }; };
|
||||
User = "${uid}:${gid}";
|
||||
};
|
||||
};
|
||||
|
||||
autoStart = false;
|
||||
ports = [ "25565:25565" ];
|
||||
volumes = [
|
||||
"minecraft:/var/lib/minecraft"
|
||||
"${eula}:/var/lib/minecraft/eula.txt:ro"
|
||||
"${icon}:/var/lib/minecraft/server-icon.png:ro"
|
||||
"${ops}:/var/lib/minecraft/ops.json:ro"
|
||||
"${properties}:/var/lib/minecraft/server.properties:ro"
|
||||
"${whitelist}:/var/lib/minecraft/whitelist.json:ro"
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue