diff options
author | lassulus <lassulus@lassul.us> | 2018-05-03 18:21:39 +0200 |
---|---|---|
committer | lassulus <lassulus@lassul.us> | 2018-05-03 18:21:39 +0200 |
commit | 7330cce0d46f23036a42e19421ca3b59dc21f9cf (patch) | |
tree | f7a2e21ab2ae384ca8b9e91dc13be3d5f5b354f5 | |
parent | 28d6704a0d617ca7d379b836ab9fdd4d6a0be868 (diff) |
l prism.r: add restic backups
-rw-r--r-- | lass/1systems/prism/config.nix | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/lass/1systems/prism/config.nix b/lass/1systems/prism/config.nix index 89ea749c5..564315e8f 100644 --- a/lass/1systems/prism/config.nix +++ b/lass/1systems/prism/config.nix @@ -333,6 +333,31 @@ in { }; }; } + { + imports = [ <stockholm/lass/2configs/backup.nix> ]; + lass.restic = genAttrs [ + "daedalus" + "icarus" + "littleT" + "mors" + "shodan" + "skynet" + ] (dest: { + dirs = [ + "/home/chat/.weechat" + "/bku/sql_dumps" + ]; + passwordFile = (toString <secrets>) + "/restic/${dest}"; + repo = "sftp:backup@${dest}.r:/backups/prism"; + extraArguments = [ + "sftp.command='ssh backup@${dest}.r -i ${config.krebs.build.host.ssh.privkey.path} -s sftp'" + ]; + timerConfig = { + OnCalendar = "00:05"; + RandomizedDelaySec = "5h"; + }; + }); + } ]; krebs.build.host = config.krebs.hosts.prism; |