From 49271c6b747c7746700048c7a9a0a66ff12bb047 Mon Sep 17 00:00:00 2001 From: Avery Date: Sat, 28 Jun 2025 00:09:06 +0200 Subject: [PATCH] Some Minecraft changes --- hosts/greatyamada/services/minecraft/default.nix | 5 +++-- hosts/greatyamada/services/minecraft/players.nix | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/hosts/greatyamada/services/minecraft/default.nix b/hosts/greatyamada/services/minecraft/default.nix index 084f0ab..868df3c 100644 --- a/hosts/greatyamada/services/minecraft/default.nix +++ b/hosts/greatyamada/services/minecraft/default.nix @@ -6,13 +6,14 @@ let packageNameToHumanString = packageName: (let getSections = packageName: + # Probably only matches Fabric servers, change as needed builtins.match "^minecraft-server-([0-9a-zA-Z.]*)-([a-zA-Z-]*)-([0-9a-zA-Z.]*)$" packageName; sections = (getSections packageName); getSection = idx: if sections == null then "Unknown" else builtins.elemAt sections idx; - in "Minecraft Server ${getSection 0} with ${ + in "Minecraft ${getSection 0} with ${ lib.strings.toSentenceCase (getSection 1) } ${getSection 2}"); playersToOps = players: @@ -98,7 +99,7 @@ in { }; files = { "ops.json".value = playersToOps (with players; [ engullejamones ]); - "whitelist.json".value = with players; [ engullejamones ]; + "whitelist.json".value = with players; [ engullejamones dankoszz ]; }; }; }; diff --git a/hosts/greatyamada/services/minecraft/players.nix b/hosts/greatyamada/services/minecraft/players.nix index c520a62..1d8d565 100644 --- a/hosts/greatyamada/services/minecraft/players.nix +++ b/hosts/greatyamada/services/minecraft/players.nix @@ -7,4 +7,5 @@ builtins.listToAttrs (map (player: { }) [ [ "engullejamones" "b65a1bc3-c6a0-4e8c-99b8-3538cfec0cfc" ] + [ "dankoszz" "87b47db0-4dd3-469c-8dfd-c21095dadd93" ] ])