aboutsummaryrefslogtreecommitdiff
path: root/systems
diff options
context:
space:
mode:
Diffstat (limited to 'systems')
-rw-r--r--systems/backup-2/databases/mariadb_replication.nix8
1 files changed, 8 insertions, 0 deletions
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";