From 39977eeb5c3df30c2ff9e359a79d5790ada16626 Mon Sep 17 00:00:00 2001 From: h7x4 Date: Tue, 11 Nov 2025 19:28:14 +0900 Subject: [PATCH] bekkalokk: source map data from the new map data impl in python --- flake.lock | 38 +++++++++++--------- flake.nix | 3 +- hosts/bekkalokk/services/bluemap/default.nix | 18 +++++++--- 3 files changed, 38 insertions(+), 21 deletions(-) diff --git a/flake.lock b/flake.lock index 68ff093..0d099ac 100644 --- a/flake.lock +++ b/flake.lock @@ -102,21 +102,6 @@ "type": "github" } }, - "minecraft-data": { - "locked": { - "lastModified": 1725277886, - "narHash": "sha256-Fw4VbbE3EfypQWSgPDFfvVH47BHeg3ptsO715NlUM8Q=", - "ref": "refs/heads/master", - "rev": "1b4087bd3322a2e2ba84271c8fcc013e6b641a58", - "revCount": 2, - "type": "git", - "url": "https://git.pvv.ntnu.no/Projects/minecraft-kartverket.git" - }, - "original": { - "type": "git", - "url": "https://git.pvv.ntnu.no/Projects/minecraft-kartverket.git" - } - }, "minecraft-heatmap": { "inputs": { "nixpkgs": [ @@ -137,6 +122,27 @@ "url": "https://git.pvv.ntnu.no/Projects/minecraft-heatmap.git" } }, + "minecraft-kartverket": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1762856548, + "narHash": "sha256-HA7z6QH4vLUWSj1Ff7lIfdbBUPrC56Qq4gWBClfxuqc=", + "ref": "rewrite-in-python", + "rev": "85b20b636d0afb64fa60323ee2406f1ae059d6c1", + "revCount": 13, + "type": "git", + "url": "https://git.pvv.ntnu.no/Projects/minecraft-kartverket.git" + }, + "original": { + "ref": "rewrite-in-python", + "type": "git", + "url": "https://git.pvv.ntnu.no/Projects/minecraft-kartverket.git" + } + }, "nix-gitea-themes": { "inputs": { "nixpkgs": [ @@ -230,8 +236,8 @@ "greg-ng": "greg-ng", "grzegorz-clients": "grzegorz-clients", "matrix-next": "matrix-next", - "minecraft-data": "minecraft-data", "minecraft-heatmap": "minecraft-heatmap", + "minecraft-kartverket": "minecraft-kartverket", "nix-gitea-themes": "nix-gitea-themes", "nixpkgs": "nixpkgs", "nixpkgs-unstable": "nixpkgs-unstable", diff --git a/flake.nix b/flake.nix index b5d1fee..4efb50b 100644 --- a/flake.nix +++ b/flake.nix @@ -33,7 +33,8 @@ grzegorz-clients.url = "git+https://git.pvv.ntnu.no/Grzegorz/grzegorz-clients.git"; grzegorz-clients.inputs.nixpkgs.follows = "nixpkgs"; - minecraft-data.url = "git+https://git.pvv.ntnu.no/Projects/minecraft-kartverket.git"; + minecraft-kartverket.url = "git+https://git.pvv.ntnu.no/Projects/minecraft-kartverket.git?ref=rewrite-in-python"; + minecraft-kartverket.inputs.nixpkgs.follows = "nixpkgs"; }; outputs = { self, nixpkgs, nixpkgs-unstable, sops-nix, disko, ... }@inputs: diff --git a/hosts/bekkalokk/services/bluemap/default.nix b/hosts/bekkalokk/services/bluemap/default.nix index e041347..eb1ad7e 100644 --- a/hosts/bekkalokk/services/bluemap/default.nix +++ b/hosts/bekkalokk/services/bluemap/default.nix @@ -1,6 +1,7 @@ { config, lib, pkgs, inputs, ... }: let vanillaSurvival = "/var/lib/bluemap/vanilla_survival_world"; + format = pkgs.formats.hocon { }; in { imports = [ ./module.nix # From danio, pending upstreaming @@ -14,20 +15,24 @@ in { services.bluemap = { enable = true; package = pkgs.callPackage ./package.nix { }; - + eula = true; onCalendar = "*-*-* 05:45:00"; # a little over an hour after auto-upgrade host = "minecraft.pvv.ntnu.no"; - maps = { + maps = let + inherit (inputs.minecraft-kartverket.packages.${pkgs.hostPlatform.system}) bluemap-export; + in { "verden" = { settings = { world = vanillaSurvival; sorting = 0; ambient-light = 0.1; cave-detection-ocean-floor = -5; - marker-sets = inputs.minecraft-data.map-markers.vanillaSurvival.verden; + marker-sets = { + _includes = [ (format.lib.mkInclude "${bluemap-export}/overworld.hocon") ]; + }; }; }; "underverden" = { @@ -42,7 +47,9 @@ in { cave-detection-ocean-floor = -5; cave-detection-uses-block-light = true; max-y = 90; - marker-sets = inputs.minecraft-data.map-markers.vanillaSurvival.underverden; + marker-sets = { + _includes = [ (format.lib.mkInclude "${bluemap-export}/nether.hocon") ]; + }; }; }; "enden" = { @@ -55,6 +62,9 @@ in { world-sky-light = 0; remove-caves-below-y = -10000; cave-detection-ocean-floor = -5; + marker-sets = { + _includes = [ (format.lib.mkInclude "${bluemap-export}/the-end.hocon") ]; + }; }; }; };