diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-10-24 00:36:35 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-10-24 00:36:35 +0200 |
commit | 285380fe566700ab3bf4f69b0a1a10fb4d9bba3a (patch) | |
tree | aa4b46df4039d6dd2a72d9558d33aadc15b66aad /modules/private | |
parent | d2e703c560bc029c3d607058de2935bbf1cb0559 (diff) | |
download | Nix-285380fe566700ab3bf4f69b0a1a10fb4d9bba3a.tar.gz Nix-285380fe566700ab3bf4f69b0a1a10fb4d9bba3a.tar.zst Nix-285380fe566700ab3bf4f69b0a1a10fb4d9bba3a.zip |
Add rsync backup
Diffstat (limited to 'modules/private')
-rw-r--r-- | modules/private/system/backup-2.nix | 16 |
1 files changed, 16 insertions, 0 deletions
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 @@ | |||
30 | interfaces."ens3".ipv6.addresses = pkgs.lib.flatten (pkgs.lib.attrsets.mapAttrsToList | 30 | interfaces."ens3".ipv6.addresses = pkgs.lib.flatten (pkgs.lib.attrsets.mapAttrsToList |
31 | (n: ips: map (ip: { address = ip; prefixLength = (if n == "main" && ip == pkgs.lib.head ips.ip6 then 64 else 128); }) (ips.ip6 or [])) | 31 | (n: ips: map (ip: { address = ip; prefixLength = (if n == "main" && ip == pkgs.lib.head ips.ip6 then 64 else 128); }) (ips.ip6 or [])) |
32 | myconfig.env.servers.backup-2.ips); | 32 | myconfig.env.servers.backup-2.ips); |
33 | |||
34 | defaultMailServer = { | ||
35 | directDelivery = true; | ||
36 | hostName = "eldiron.immae.eu:25"; | ||
37 | useTLS = true; | ||
38 | useSTARTTLS = true; | ||
39 | root = "postmaster@immae.eu"; | ||
40 | }; | ||
41 | }; | ||
42 | |||
43 | services.rsyncBackup = { | ||
44 | mountpoint = "/backup2"; | ||
45 | mailto = myconfig.env.rsync_backup.mailto; | ||
46 | profiles = myconfig.env.rsync_backup.profiles; | ||
47 | ssh_key_public = myconfig.env.rsync_backup.ssh_key.public; | ||
48 | ssh_key_private = myconfig.env.rsync_backup.ssh_key.private; | ||
33 | }; | 49 | }; |
34 | 50 | ||
35 | # This value determines the NixOS release with which your system is | 51 | # This value determines the NixOS release with which your system is |