nixos/bluemap: merge addons option into packs

Mentioned in the release notes for bluemap 5.5:

> Move all contents (if any) of bluemaps addons folder into
> bluemaps packs folder and delete the addons folder.
> (Native addons now go into the packs folder alongside resourcepacks)

https://github.com/BlueMap-Minecraft/BlueMap/releases/tag/v5.5
This commit is contained in:
h7x4 2025-05-28 12:58:09 +02:00
parent 86783802bf
commit 5b3e5519c1
No known key found for this signature in database
GPG key ID: 9F2F7D8250F35146

View file

@ -18,10 +18,6 @@ let
) cfg.maps
);
addonsFolder = pkgs.linkFarm "addons" (
lib.attrsets.mapAttrs' (name: value: lib.nameValuePair "${name}.jar" value) cfg.addons
);
storageFolder = pkgs.linkFarm "storage" (
lib.attrsets.mapAttrs' (
name: value: lib.nameValuePair "${name}.conf" (format.generate "${name}.conf" value)
@ -34,8 +30,7 @@ let
"core.conf" = coreConfig;
"webapp.conf" = webappConfig;
"webserver.conf" = webserverConfig;
"packs" = pkgs.linkFarm "packs" cfg.resourcepacks;
"addons" = addonsFolder;
"packs" = pkgs.linkFarm "packs" cfg.packs;
};
inherit (lib) mkOption;
@ -46,6 +41,7 @@ in
[ "services" "bluemap" "resourcepacks" ]
[ "services" "bluemap" "packs" ]
)
(lib.mkRenamedOptionModule [ "services" "bluemap" "addons" ] [ "services" "bluemap" "packs" ])
];
options.services.bluemap = {
@ -239,26 +235,6 @@ in
'';
};
addons = mkOption {
type = lib.types.attrsOf lib.types.pathInStore;
default = { };
description = ''
A set of jar addons to be loaded.
See <https://bluemap.bluecolored.de/3rdPartySupport.html> for a list of officially recognized addons.
'';
example = lib.literalExpression ''
{
blueBridge = ./blueBridge.jar;
blueBorder = pkgs.fetchurl {
url = "https://github.com/pop4959/BlueBorder/releases/download/1.1.1/BlueBorder-1.1.1.jar";
hash = "...";
};
}
'';
};
storage = mkOption {
type = lib.types.attrsOf (
lib.types.submodule {