From 670d287ee1dc24437ecdd030ccacd2cb5d55109a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Isma=C3=ABl=20Bouya?= Date: Fri, 13 Oct 2023 13:56:21 +0200 Subject: [PATCH] Bump MariaDB to latest stable version --- flakes/private/system/flake.nix | 2 +- systems/backup-2/databases/mariadb_replication.nix | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/flakes/private/system/flake.nix b/flakes/private/system/flake.nix index 3e48358..4a83e36 100644 --- a/flakes/private/system/flake.nix +++ b/flakes/private/system/flake.nix @@ -38,7 +38,7 @@ [ (self: super: { postgresql = self.postgresql_pam; - mariadb = self.mariadb_106.overrideAttrs(old: { + mariadb = self.mariadb_1011.overrideAttrs(old: { passthru = old.passthru // { mysqlVersion = "5.7"; }; }); }) # don’t put them as generic overlay because of home-manager diff --git a/systems/backup-2/databases/mariadb_replication.nix b/systems/backup-2/databases/mariadb_replication.nix index 8d2b457..6616de0 100644 --- a/systems/backup-2/databases/mariadb_replication.nix +++ b/systems/backup-2/databases/mariadb_replication.nix @@ -195,6 +195,14 @@ in } ) cfg.hosts; + environment.systemPackages = lib.mapAttrsToList (name: hcfg: + pkgs.writeScriptBin "mysql_backup_${name}" '' + #!${pkgs.stdenv.shell} + + exec ${hcfg.package}/bin/mysql -S /run/mysqld_${name}/mysqld.sock "$@" + '' + ) cfg.hosts; + systemd.services = lib.attrsets.mapAttrs' (name: hcfg: let dataDir = "${cfg.base}/${name}/mysql"; -- 2.41.0