diff --git a/nixos/doc/manual/release-notes/rl-2411.section.md b/nixos/doc/manual/release-notes/rl-2411.section.md index 0e74514eaab8..6f2dd011eaf0 100644 --- a/nixos/doc/manual/release-notes/rl-2411.section.md +++ b/nixos/doc/manual/release-notes/rl-2411.section.md @@ -179,6 +179,8 @@ - `services.kubernetes.kubelet.clusterDns` now accepts a list of DNS resolvers rather than a single string, bringing the module more in line with the upstream Kubelet configuration schema. +- `bluemap` has changed the format used to store map tiles, and the database layout has been heavily modified. Upstream recommends a clean reinstallation: . Unless you are using an SQL storage backend, this should only entail deleting the contents of `config.services.bluemap.coreSettings.data` (defaults to `/var/lib/bluemap`) and `config.services.bluemap.webRoot` (defaults to `/var/lib/bluemap/web`). + - `wstunnel` has had a major version upgrade that entailed rewriting the program in Rust. The module was updated to accommodate for breaking changes. Breaking changes to the module API were minimised as much as possible, diff --git a/nixos/modules/services/web-servers/bluemap.nix b/nixos/modules/services/web-servers/bluemap.nix index 731468fd9a0e..0b45501980e6 100644 --- a/nixos/modules/services/web-servers/bluemap.nix +++ b/nixos/modules/services/web-servers/bluemap.nix @@ -13,6 +13,9 @@ let (format.generate "${name}.conf" value)) 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" @@ -25,11 +28,16 @@ let "core.conf" = coreConfig; "webapp.conf" = webappConfig; "webserver.conf" = webserverConfig; - "resourcepacks" = pkgs.linkFarm "resourcepacks" cfg.resourcepacks; + "packs" = pkgs.linkFarm "packs" cfg.resourcepacks; + "addons" = addonsFolder; }; inherit (lib) mkOption; in { + imports = [ + (lib.mkRenamedOptionModule [ "services" "bluemap" "resourcepacks" ] [ "services" "bluemap" "packs" ]) + ]; + options.services.bluemap = { enable = lib.mkEnableOption "bluemap"; @@ -219,6 +227,26 @@ in { ''; }; + addons = mkOption { + type = lib.types.attrsOf lib.types.pathInStore; + default = { }; + description = '' + A set of jar addons to be loaded. + + See 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 { freeformType = format.type; @@ -249,10 +277,13 @@ in { ''; }; - resourcepacks = mkOption { + packs = mkOption { type = lib.types.attrsOf lib.types.pathInStore; default = { }; - description = "A set of resourcepacks to use, loaded in alphabetical order"; + description = '' + A set of resourcepacks, datapacks, and mods to extract resources from, + loaded in alphabetical order. + ''; }; }; @@ -293,11 +324,12 @@ in { "${cfg.host}" = { root = config.services.bluemap.webRoot; locations = { - "~* ^/maps/[^/]*/tiles/[^/]*.json$".extraConfig = '' - error_page 404 =200 /assets/emptyTile.json; + "@empty".return = "204"; + + "~* ^/maps/[^/]*/tiles/".extraConfig = '' + error_page 404 = @empty; gzip_static always; ''; - "~* ^/maps/[^/]*/tiles/[^/]*.png$".tryFiles = "$uri =204"; }; }; }; diff --git a/pkgs/by-name/bl/bluemap/package.nix b/pkgs/by-name/bl/bluemap/package.nix index 97e8831d13ee..6275295aaefd 100644 --- a/pkgs/by-name/bl/bluemap/package.nix +++ b/pkgs/by-name/bl/bluemap/package.nix @@ -2,11 +2,11 @@ stdenvNoCC.mkDerivation rec { pname = "bluemap"; - version = "3.21"; + version = "5.4"; src = fetchurl { url = "https://github.com/BlueMap-Minecraft/BlueMap/releases/download/v${version}/BlueMap-${version}-cli.jar"; - hash = "sha256-YWf69+nsMfqk2x9xGTt+tdnGvaU+6rPsiBLWsP89ngM="; + hash = "sha256-ycgCYot3lTdkufJdOSX/PMWI2fnAWz8f5I9IWZpKppw="; }; dontUnpack = true;