diff --git a/modules/homelab/gameservers/minecraft_recpro/default.nix b/modules/homelab/gameservers/minecraft_recpro/default.nix index 91a0b58..8767749 100644 --- a/modules/homelab/gameservers/minecraft_recpro/default.nix +++ b/modules/homelab/gameservers/minecraft_recpro/default.nix @@ -86,7 +86,8 @@ in } ]; initialScript = pkgs.writeText "minecraft_recpro-init.sql" '' - CREATE USER IF NOT EXISTS 'minecraft_recpro'@'localhost' IDENTIFIED BY 'IKNOWTHISISBADIJUSTNEEDITTOWORK'; + SET @passwd = LOAD_FILE('/run/secrets/minecraft_recpro_db_passwd'); + CREATE USER IF NOT EXISTS 'minecraft_recpro'@'localhost' IDENTIFIED BY @passwd; GRANT ALL PRIVILEGES ON minecraft_recpro_db.* TO 'minecraft_recpro'@'localhost'; FLUSH PRIVILEGES; '';