]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - modules/private/system/backup-2.nix
Add mysql replication
[perso/Immae/Config/Nix.git] / modules / private / system / backup-2.nix
index 3120a5715086ddbc96b3bedec54522eaccd36c48..0e94a1ad6afe419c002643d51c376697f81b9d76 100644 (file)
         };
       };
     };
+    mariadb = {
+      enable = true;
+      base = "/backup2";
+      hosts = {
+        eldiron = {
+          serverId = 2;
+          # mysql resolves "backup-2" host and checks the ip, but uses /etc/hosts which only contains ip4
+          host = myconfig.env.servers.eldiron.ips.main.ip4;
+          port = "3306";
+          user = "backup-2";
+          password = myconfig.env.ldap.backup-2.password;
+          dumpUser = "root";
+          dumpPassword = myconfig.env.databases.mysql.systemUsers.root;
+        };
+      };
+    };
   };
 
   # This value determines the NixOS release with which your system is