226 current 2025-10-10 21:05:33 25.05.20251006.20c4598 6.12.50 *

This commit is contained in:
2025-10-10 21:18:21 -05:00
parent 56d7504a79
commit 13cfe73b65
2 changed files with 4 additions and 6 deletions

View File

@@ -1,6 +1,6 @@
# flake for blakes nixos config # flake for blakes nixos config
# define new devices in outputs # define new devices in outputs
# generation: 225 current 2025-10-10 21:01:34 25.05.20251006.20c4598 6.12.50 * # generation: 226 current 2025-10-10 21:05:33 25.05.20251006.20c4598 6.12.50 *
{ {
description = "blakes nix config"; description = "blakes nix config";
inputs = { inputs = {

View File

@@ -81,14 +81,12 @@ in
ensureDatabases = [ "minecraft_recpro_db" ]; ensureDatabases = [ "minecraft_recpro_db" ];
ensureUsers = [ ensureUsers = [
{ {
name = "minecraft"; name = "minecraft_recpro";
ensurePermissions = { "minecraft_recpro_db.*" = "ALL PRIVILEGES"; }; ensurePermissions = { "minecraft_recpro_db.*" = "ALL PRIVILEGES"; };
} }
]; ];
initialScript = pkgs.writeText "minecraft_recpro-init.sql" '' initialScript = pkgs.writeText "minecraft_recpro_init.sql" ''
CREATE DATABASE IF NOT EXISTS minecraft_recpro_db; ALTER USER 'minecraft_recpro'@'localhost' IDENTIFIED BY '$(cat ${config.sops.secrets."minecraft_recpro_db_passwd".path})';
CREATE USER IF NOT EXISTS 'minecraft_recpro'@'localhost' IDENTIFIED BY '$(cat ${config.sops.secrets."minecraft_recpro_db_passwd".path})';
GRANT ALL PRIVILEGES ON minecraft_recpro_db.* TO 'minecraft_recpro'@'localhost';
FLUSH PRIVILEGES; FLUSH PRIVILEGES;
''; '';
}; };