aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--flakes/private/system/flake.nix2
-rw-r--r--systems/backup-2/databases/mariadb_replication.nix8
2 files changed, 9 insertions, 1 deletions
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 @@
38 [ 38 [
39 (self: super: { 39 (self: super: {
40 postgresql = self.postgresql_pam; 40 postgresql = self.postgresql_pam;
41 mariadb = self.mariadb_106.overrideAttrs(old: { 41 mariadb = self.mariadb_1011.overrideAttrs(old: {
42 passthru = old.passthru // { mysqlVersion = "5.7"; }; 42 passthru = old.passthru // { mysqlVersion = "5.7"; };
43 }); 43 });
44 }) # don’t put them as generic overlay because of home-manager 44 }) # 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
195 } 195 }
196 ) cfg.hosts; 196 ) cfg.hosts;
197 197
198 environment.systemPackages = lib.mapAttrsToList (name: hcfg:
199 pkgs.writeScriptBin "mysql_backup_${name}" ''
200 #!${pkgs.stdenv.shell}
201
202 exec ${hcfg.package}/bin/mysql -S /run/mysqld_${name}/mysqld.sock "$@"
203 ''
204 ) cfg.hosts;
205
198 systemd.services = lib.attrsets.mapAttrs' (name: hcfg: 206 systemd.services = lib.attrsets.mapAttrs' (name: hcfg:
199 let 207 let
200 dataDir = "${cfg.base}/${name}/mysql"; 208 dataDir = "${cfg.base}/${name}/mysql";