dendrify: comfy-station

This commit is contained in:
2026-03-27 17:49:01 +01:00
parent 5ca75f28db
commit 88b3ff784a
205 changed files with 4036 additions and 1227 deletions

View File

@@ -0,0 +1,44 @@
{
config,
pkgs,
lib,
...
}: let
cfg = config.hive.minecraft-server;
modpack = pkgs.callPackage ./loadCurseForge.nix {
url = "https://mediafilez.forgecdn.net/files/7765/203/BMC3_Server_Pack_v44.zip";
hash = "sha256-doqPzo9fhYM9ng/3RO6OPqhKA2ibfoaKx3Es7M0lpuU=";
};
mcVersion = modpack.variables.MINECRAFT_VERSION;
loader = lib.toLower modpack.variables.MODLOADER;
loaderVersion = modpack.variables.MODLOADER_VERSION;
serverVersion = lib.replaceStrings ["."] ["_"] "${loader}-${mcVersion}";
in {
options.hive.minecraft-server = {
enable = lib.mkEnableOption "Enable BMC3 server";
};
config = lib.mkIf cfg.enable {
services.minecraft-servers = {
enable = true;
eula = true;
openFirewall = true;
servers.bmc3 = lib.optionalAttrs cfg.enable {
enable = true;
autoStart = false;
package = pkgs."${loader}Servers".${serverVersion}.override {inherit loaderVersion;};
jvmOpts = modpack.variables.JAVA_ARGS;
symlinks = {
"mods" = "${modpack.root}/mods";
};
serverProperties = {
motd = "Woher kommt der Stein?";
white-list = true;
};
};
};
};
}