summaryrefslogtreecommitdiff
path: root/services/mysql.nix
diff options
context:
space:
mode:
authorJakub Stachurski <j.stachurski@student.utwente.nl>2026-01-25 17:23:01 +0100
committerJakub Stachurski <j.stachurski@student.utwente.nl>2026-01-25 17:23:01 +0100
commit19835b9be47ba9b96b1f72c93c98e3c3866a858a (patch)
tree17b21a488ca321fe2831229381f06ed1f32b57b5 /services/mysql.nix
parent77b23ce8e86b24e6aed30fadced85d6a2d7dd0a7 (diff)
Fixes in secrets and services.
Mostly fixes connection to mysql and the unix-socket auth for it.
Diffstat (limited to '')
-rw-r--r--services/mysql.nix10
1 files changed, 6 insertions, 4 deletions
diff --git a/services/mysql.nix b/services/mysql.nix
index 92db5f7..445751a 100644
--- a/services/mysql.nix
+++ b/services/mysql.nix
@@ -35,10 +35,10 @@ let
name:
''
-- Clauses for user ${name}
- ALTER USER IF EXISTS '${name}'@'localhost' IDENTIFIED BY unix_socket';
- CREATE USER IF NOT EXISTS '${name}'@'localhost' IDENTIFIED BY unix_socket';
+ ALTER USER IF EXISTS '${name}'@'localhost' IDENTIFIED VIA unix_socket;
+ CREATE USER IF NOT EXISTS '${name}'@'localhost' IDENTIFIED VIA unix_socket;
''
- + (lib.concatMapAttrsStringSep "\n" (priviledge_clause name) (create_users_ensure name));
+ + (lib.concatMapAttrsStringSep "\n" (priviledge_clause "'${name}'@'localhost'") (create_users_ensure name));
in
{
@@ -105,7 +105,8 @@ in
lib.concatLines (
(builtins.attrValues (builtins.mapAttrs add-user-clauses cfg.users))
++ (map add-unix-user-clauses cfg.unix_users)
- )
+ ++ ["FLUSH PRIVILEGES;"]
+ )
);
};
@@ -116,6 +117,7 @@ in
package = pkgs.mariadb;
settings = {
mysqld = {
+ # socket="/var/lib/mysql/mysql.sock";
log_error = "/var/log/mysql_err.log";
log_warnings = 2;
};