X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=modules%2Fprivate%2Fsystem%2Fbackup-2.nix;h=3d51fa3bdaf2305fbf0b9bc4d2edde6060d4ec40;hb=dded66995529a0419cc56778f4ebb4247c2ab765;hp=1c5b7d84b383cebbd86a839c3872d5f1dd670d7c;hpb=ec9b656476d4af2784aea29b846bead85dc46e16;p=perso%2FImmae%2FConfig%2FNix.git diff --git a/modules/private/system/backup-2.nix b/modules/private/system/backup-2.nix index 1c5b7d8..3d51fa3 100644 --- a/modules/private/system/backup-2.nix +++ b/modules/private/system/backup-2.nix @@ -3,6 +3,7 @@ { boot.kernelPackages = pkgs.linuxPackages_latest; _module.args.privateFiles = privateFiles; + _module.args.hostFQDN = "backup-2.v.immae.eu"; imports = builtins.attrValues (import ../..); deployment = { @@ -48,6 +49,7 @@ ssh_key_private = myconfig.env.rsync_backup.ssh_key.private; }; + myServices.monitoring.enable = true; myServices.databasesReplication = { postgresql = { enable = true; @@ -59,6 +61,32 @@ }; }; }; + 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; + }; + }; + }; + redis = { + enable = true; + base = "/backup2"; + hosts = { + eldiron = { + host = "127.0.0.1"; + port = "16379"; + }; + }; + }; }; # This value determines the NixOS release with which your system is