]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - modules/private/system/backup-2.nix
Add postgresql replication for backup-2
[perso/Immae/Config/Nix.git] / modules / private / system / backup-2.nix
index 615167150a10c27b4788fd90bc463f078d75e006..1c5b7d84b383cebbd86a839c3872d5f1dd670d7c 100644 (file)
     ssh_key_private = myconfig.env.rsync_backup.ssh_key.private;
   };
 
+  myServices.databasesReplication = {
+    postgresql = {
+      enable = true;
+      base = "/backup2";
+      hosts = {
+        eldiron = {
+          slot = "backup_2";
+          connection = "postgresql://backup-2:${myconfig.env.ldap.backup-2.password}@eldiron.immae.eu";
+        };
+      };
+    };
+  };
+
   # This value determines the NixOS release with which your system is
   # to be compatible, in order to avoid breaking some software such as
   # database servers. You should change this only after NixOS release