From 7303d173ec4e75236d6668bbd18b6aae643f2265 Mon Sep 17 00:00:00 2001 From: kB01 Date: Sun, 9 Feb 2025 00:14:13 +0100 Subject: [PATCH] luckperms Config is now nixified AND uses SOPS secrets --- modules/nixos/services/minecraft/velocity.nix | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/modules/nixos/services/minecraft/velocity.nix b/modules/nixos/services/minecraft/velocity.nix index 9b211b0..3ab1b26 100644 --- a/modules/nixos/services/minecraft/velocity.nix +++ b/modules/nixos/services/minecraft/velocity.nix @@ -60,16 +60,14 @@ in # Configure Plugin Luckperms sops.templates."minecraft/velocity/plugin/luckperms/config.yml".path = "/srv/minecraft/velocity/plugins/luckperms/config.yml"; - sops.templates."minecraft/velocity/plugin/luckperms/config.yml".content = '' - storage-method: mariadb - data: - address: localhost:${toString config.services.mysql.settings.mysqld.port} - database: luckperms - username: luckperms - password: ${config.sops.placeholder."minecraft/database/luckperms_password"} - ''; - - + sops.templates."minecraft/velocity/plugin/luckperms/config.yml".owner = config.services.minecraft-servers.user; + sops.templates."minecraft/velocity/plugin/luckperms/config.yml".content = lib.generators.toYAML { } { # Unfortunately currently lib.generators.toYAML generates JSON, and the File will not be Human readable + storage-method = "mariadb"; + data.address = "localhost:${toString config.services.mysql.settings.mysqld.port}"; + data.database = "luckperms"; + data.username = "luckperms"; + data.password = ''${config.sops.placeholder."minecraft/database/luckperms_password"}''; # Secret created in ./database.nix + }; }; }