From 85e6635bb75d92ab1be1b80d65ba89723df436e9 Mon Sep 17 00:00:00 2001 From: blake Date: Fri, 10 Oct 2025 04:00:23 -0500 Subject: [PATCH] 212 current 2025-10-10 03:46:48 25.05.20251006.20c4598 6.12.50 * --- modules/homelab/gameservers/minecraft_recpro/default.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/homelab/gameservers/minecraft_recpro/default.nix b/modules/homelab/gameservers/minecraft_recpro/default.nix index c5f7432..c5bec4b 100644 --- a/modules/homelab/gameservers/minecraft_recpro/default.nix +++ b/modules/homelab/gameservers/minecraft_recpro/default.nix @@ -82,10 +82,15 @@ in ensureUsers = [ { name = "minecraft_recpro"; - passwordFile = sec."minecraft_recpro_db_passwd".path; ensurePermissions = { "minecraft_recpro_db.*" = "ALL PRIVILEGES"; }; } ]; + initialScript = pkgs.writeText "minecraft_recpro-init.sql" '' + CREATE DATABASE IF NOT EXISTS minecraft_recpro_db; + CREATE USER IF NOT EXISTS 'minecraft_recpro'@'localhost' IDENTIFIED BY '${builtins.readFile /run/secrets/minecraft_recpro_db_passwd}'; + GRANT ALL PRIVILEGES ON minecraft_recpro.* TO 'minecraft_recpro'@'localhost'; + FLUSH PRIVILEGES; + ''; }; # open firewall