]> git.immae.eu Git - perso/Immae/Config/Nix.git/commitdiff
Bump MariaDB to latest stable version
authorIsmaël Bouya <ismael.bouya@normalesup.org>
Fri, 13 Oct 2023 11:56:21 +0000 (13:56 +0200)
committerIsmaël Bouya <ismael.bouya@normalesup.org>
Thu, 26 Oct 2023 22:13:24 +0000 (00:13 +0200)
flakes/private/system/flake.nix
systems/backup-2/databases/mariadb_replication.nix

index 3e48358929bc65714b96d3c2bb557ac7c52c276a..4a83e3642978291381513db19fe3f41799df3bcc 100644 (file)
@@ -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
index 8d2b45727652fba98ea1db897726c5561c08e169..6616de07f14ec721806c63610d027130fc110b7a 100644 (file)
@@ -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";