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

@@ -1,44 +0,0 @@
{
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;
};
};
};
};
}

View File

@@ -1,36 +0,0 @@
{
url ? null,
hash ? null,
pkgs,
lib,
...
}: let
modpack = pkgs.fetchzip {
inherit url hash;
stripRoot = false;
};
variablesStr = builtins.readFile "${modpack}/variables.txt";
variableLines =
builtins.filter (l: l != "" && (lib.strings.elemAt (lib.stringToCharacters l) 0) != "#")
(lib.strings.splitString "\n" variablesStr);
stripQuotes = s:
if builtins.match "^\".*\"$" s != null
then builtins.substring 1 (builtins.stringLength s - 2) s
else s;
parseLine = line: let
parts = lib.strings.splitString "=" line;
in {
name = builtins.elemAt parts 0;
value = stripQuotes (builtins.concatStringsSep "=" (builtins.tail parts));
};
variables = builtins.listToAttrs (map parseLine variableLines);
in {
inherit variables;
root = modpack;
mods = "${modpack}/mods";
config = "${modpack}/config";
}