From 285380fe566700ab3bf4f69b0a1a10fb4d9bba3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Thu, 24 Oct 2019 00:36:35 +0200 Subject: Add rsync backup --- modules/private/system/backup-2.nix | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'modules/private') diff --git a/modules/private/system/backup-2.nix b/modules/private/system/backup-2.nix index 80fa36d..6151671 100644 --- a/modules/private/system/backup-2.nix +++ b/modules/private/system/backup-2.nix @@ -30,6 +30,22 @@ interfaces."ens3".ipv6.addresses = pkgs.lib.flatten (pkgs.lib.attrsets.mapAttrsToList (n: ips: map (ip: { address = ip; prefixLength = (if n == "main" && ip == pkgs.lib.head ips.ip6 then 64 else 128); }) (ips.ip6 or [])) myconfig.env.servers.backup-2.ips); + + defaultMailServer = { + directDelivery = true; + hostName = "eldiron.immae.eu:25"; + useTLS = true; + useSTARTTLS = true; + root = "postmaster@immae.eu"; + }; + }; + + services.rsyncBackup = { + mountpoint = "/backup2"; + mailto = myconfig.env.rsync_backup.mailto; + profiles = myconfig.env.rsync_backup.profiles; + ssh_key_public = myconfig.env.rsync_backup.ssh_key.public; + ssh_key_private = myconfig.env.rsync_backup.ssh_key.private; }; # This value determines the NixOS release with which your system is -- cgit v1.2.3