From dfba435c937121806c87d9950f4a6705efa3eb9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charlotte=20=F0=9F=A6=9D=20Delenk?= Date: Wed, 15 Feb 2023 10:31:05 +0100 Subject: [PATCH] update minecraft extensions and install dynmap --- config/services/minecraft.nix | 14 ++++++ packages/minecraft/dynmap.nix | 6 +++ packages/minecraft/essentialsx.nix | 12 ++--- packages/minecraft/luckperms.nix | 78 +++++++++++++++--------------- 4 files changed, 65 insertions(+), 45 deletions(-) create mode 100644 packages/minecraft/dynmap.nix diff --git a/config/services/minecraft.nix b/config/services/minecraft.nix index 6bc2b1a0..f18eb343 100644 --- a/config/services/minecraft.nix +++ b/config/services/minecraft.nix @@ -211,4 +211,18 @@ networking.firewall.allowedTCPPorts = [ config.services.minecraft.properties.server-port ]; + config.minecraft.plugins = [ + (pkgs.callPackage ../../packages/minecraft/dynmap.nix {}).core + ]; + services.caddy.virtualHosts."mc.chir.rs" = { + useACMEHost = "mc.chir.rs"; + logFormat = pkgs.lib.mkForce ""; + extraConfig = '' + import baseConfig + + reverse_proxy http://127.0.0.1:8123 { + trusted_proxies private_ranges + } + ''; + }; } diff --git a/packages/minecraft/dynmap.nix b/packages/minecraft/dynmap.nix new file mode 100644 index 00000000..11736505 --- /dev/null +++ b/packages/minecraft/dynmap.nix @@ -0,0 +1,6 @@ +{fetchurl}: { + core = fetchurl { + url = "https://dev.bukkit.org/projects/dynmap/files/4371728/download"; + sha256 = "12n0s4qhc5gbsw649jpjyn7x4g4ilkbqq188l2r4wpwp38l134a0"; + }; +} diff --git a/packages/minecraft/essentialsx.nix b/packages/minecraft/essentialsx.nix index 71cc3486..74adc01e 100644 --- a/packages/minecraft/essentialsx.nix +++ b/packages/minecraft/essentialsx.nix @@ -90,15 +90,15 @@ in rec { ''; }; essentialsx = fetchurl { - url = "https://github.com/EssentialsX/Essentials/releases/download/2.19.4/EssentialsX-2.19.4.jar"; - sha256 = "4d13a8a556f9695482c73693c6423fc5c029976fb17001d8d142a02debd0e22d"; + url = "https://github.com/EssentialsX/Essentials/releases/download/2.19.7/EssentialsX-2.19.7.jar"; + sha256 = "1pnlgnb61psdhc4zb2y5p577ryk4c5kdyk3v0p3nnr0nnsabqldm"; }; essentialsx-chat = fetchurl { - url = "https://github.com/EssentialsX/Essentials/releases/download/2.19.4/EssentialsXChat-2.19.4.jar"; - sha256 = "352475f8917f2a96c23e6a4e1ec846a90ca4ede41d8dd7878f96a9b011c16c2a"; + url = "https://github.com/EssentialsX/Essentials/releases/download/2.19.7/EssentialsXChat-2.19.7.jar"; + sha256 = "1w86yrld44l0zlkvvykkypygp818h9l5wfn3v6q9z19q9zhsirm1"; }; essentialsx-spawn = fetchurl { - url = "https://github.com/EssentialsX/Essentials/releases/download/2.19.4/EssentialsXSpawn-2.19.4.jar"; - sha256 = "4d30ae58315f7640e9033518a54a03e28309c1cc656267c760710bd1ec3c016e"; + url = "https://github.com/EssentialsX/Essentials/releases/download/2.19.7/EssentialsXSpawn-2.19.7.jar"; + sha256 = "08vlvhw9wmg6bfc2rq4df3ahf7n54vwf9nx7bw3qz27zka0rv3w7"; }; } diff --git a/packages/minecraft/luckperms.nix b/packages/minecraft/luckperms.nix index 41aa6220..a9ff4162 100644 --- a/packages/minecraft/luckperms.nix +++ b/packages/minecraft/luckperms.nix @@ -72,44 +72,44 @@ }; in /* - stdenv.mkDerivation { - inherit pname version src; - - name = "${pname}-${version}.jar"; - - nativeBuildInputs = [ git ]; - - postPatch = addResolveStep; - - buildPhase = '' - ${gnused}/bin/sed -i "s#'bukkit-legacy',##" settings.gradle - ${gnused}/bin/sed -i "s#'bukkit-legacy:loader',##" settings.gradle - ${gnused}/bin/sed -i "s#'bungee',##" settings.gradle - ${gnused}/bin/sed -i "s#'bungee:loader',##" settings.gradle - ${gnused}/bin/sed -i "s#'nukkit',##" settings.gradle - ${gnused}/bin/sed -i "s#'nukkit:loader',##" settings.gradle - ${gnused}/bin/sed -i "s#'sponge',##" settings.gradle - ${gnused}/bin/sed -i "s#'sponge:loader',##" settings.gradle - ${gnused}/bin/sed -i "s#'sponge:sponge-service',##" settings.gradle - ${gnused}/bin/sed -i "s#'sponge:sponge-service-api8',##" settings.gradle - ${gnused}/bin/sed -i "s#'velocity'##" settings.gradle - export GRADLE_USER_HOME=$(${coreutils}/bin/mktemp -d) - - # add local maven repo - ${gnused}/bin/sed -i "s#mavenCentral()#mavenCentral(); maven { url '${deps}/maven' }#" build.gradle - ${gnused}/bin/sed -i "s#jcenter()#jcenter(); maven { url '${deps}/maven' }#" settings.gradle - ${gnused}/bin/sed -i "s#'fabric',##" settings.gradle - - ${gradle}/bin/gradle --offline --no-daemon --info -Dorg.gradle.java.home=${openjdk17_headless} build - ''; - - installPhase = '' - cp bukkit/loader/build/libs/LuckPerms-Bukkit-5.4.0.jar $out - ''; - - } - */ + stdenv.mkDerivation { + inherit pname version src; + + name = "${pname}-${version}.jar"; + + nativeBuildInputs = [ git ]; + + postPatch = addResolveStep; + + buildPhase = '' + ${gnused}/bin/sed -i "s#'bukkit-legacy',##" settings.gradle + ${gnused}/bin/sed -i "s#'bukkit-legacy:loader',##" settings.gradle + ${gnused}/bin/sed -i "s#'bungee',##" settings.gradle + ${gnused}/bin/sed -i "s#'bungee:loader',##" settings.gradle + ${gnused}/bin/sed -i "s#'nukkit',##" settings.gradle + ${gnused}/bin/sed -i "s#'nukkit:loader',##" settings.gradle + ${gnused}/bin/sed -i "s#'sponge',##" settings.gradle + ${gnused}/bin/sed -i "s#'sponge:loader',##" settings.gradle + ${gnused}/bin/sed -i "s#'sponge:sponge-service',##" settings.gradle + ${gnused}/bin/sed -i "s#'sponge:sponge-service-api8',##" settings.gradle + ${gnused}/bin/sed -i "s#'velocity'##" settings.gradle + export GRADLE_USER_HOME=$(${coreutils}/bin/mktemp -d) + + # add local maven repo + ${gnused}/bin/sed -i "s#mavenCentral()#mavenCentral(); maven { url '${deps}/maven' }#" build.gradle + ${gnused}/bin/sed -i "s#jcenter()#jcenter(); maven { url '${deps}/maven' }#" settings.gradle + ${gnused}/bin/sed -i "s#'fabric',##" settings.gradle + + ${gradle}/bin/gradle --offline --no-daemon --info -Dorg.gradle.java.home=${openjdk17_headless} build + ''; + + installPhase = '' + cp bukkit/loader/build/libs/LuckPerms-Bukkit-5.4.0.jar $out + ''; + + } + */ fetchurl { - url = "https://ci.lucko.me/job/LuckPerms/1429/artifact/bukkit/loader/build/libs/LuckPerms-Bukkit-5.4.21.jar"; - sha256 = "bd9090b3cf1412d77ff58ee0c2c7229184306cc83ff18ff4681ea1b7116b3747"; + url = "https://ci.lucko.me/job/LuckPerms/lastSuccessfulBuild/artifact/fabric/build/libs/LuckPerms-Fabric-5.4.61.jar"; + sha256 = "1vqj261rq6342imm99gnbmja6zgd543myjf05jb0qm3rgc6d5n7p"; }