diff options
| author | Jakub Stachurski <j.stachurski@student.utwente.nl> | 2026-02-11 15:29:51 +0100 |
|---|---|---|
| committer | Jakub Stachurski <j.stachurski@student.utwente.nl> | 2026-02-11 15:29:51 +0100 |
| commit | bb87f9ebadc3bb5c5158d9fbad9a5acef8c8f692 (patch) | |
| tree | caa99f185696dbfbe469bc19518c3d5a28251495 /services/mysql.nix | |
| parent | 4843cb92bfff84fef92af97be76165b4fa7be9c4 (diff) | |
Apply changes from messing around and making things work
Diffstat (limited to '')
| -rw-r--r-- | services/mysql.nix | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/services/mysql.nix b/services/mysql.nix index 83a5033..06edfcb 100644 --- a/services/mysql.nix +++ b/services/mysql.nix @@ -23,10 +23,10 @@ let ( '' -- Clauses for user ${name} - ALTER USER IF EXISTS '${name}'@'%' IDENTIFIED BY '${ucfg.sopsPlaceholder}'; - CREATE USER IF NOT EXISTS '${name}'@'%' IDENTIFIED BY '${ucfg.sopsPlaceholder}'; + ALTER USER IF EXISTS '${name}'@'${ucfg.host}' IDENTIFIED BY '${ucfg.sopsPlaceholder}'; + CREATE USER IF NOT EXISTS '${name}'@'${ucfg.host}' IDENTIFIED BY '${ucfg.sopsPlaceholder}'; '' - + (lib.concatMapAttrsStringSep "\n" (priviledge_clause "'name'@'%'") (create_users_ensure name)) + + (lib.concatMapAttrsStringSep "\n" (priviledge_clause "'${name}'@'${ucfg.host}'") (create_users_ensure name)) ) else " -- Ommitted user ${name}"; @@ -84,6 +84,10 @@ in allowedRanges = mkOption { type = types.listOf types.str; }; + host = mkOption { + type = types.str; + default = "%"; + }; }; } ); |
