diff options
author | lassulus <lassulus@lassul.us> | 2019-04-07 18:55:47 +0200 |
---|---|---|
committer | lassulus <lassulus@lassul.us> | 2019-04-07 19:36:05 +0200 |
commit | 4769b3186597117daec579ac71df79e2fafabcf5 (patch) | |
tree | 40dc0e808a25cf966f0f704aa3e7590b256e29f7 | |
parent | 44a48a8d3a4ce4732545a96828bf41ab6cf283da (diff) |
l blue.r: backup with services.restic
-rw-r--r-- | lass/1systems/blue/config.nix | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/lass/1systems/blue/config.nix b/lass/1systems/blue/config.nix index da555a860..84c8a5b3e 100644 --- a/lass/1systems/blue/config.nix +++ b/lass/1systems/blue/config.nix @@ -30,7 +30,7 @@ with import <stockholm/lib>; networking.nameservers = [ "1.1.1.1" ]; - lass.restic = genAttrs [ + services.restic.backups = genAttrs [ "daedalus" "icarus" "littleT" @@ -38,20 +38,19 @@ with import <stockholm/lib>; "shodan" "skynet" ] (dest: { - dirs = [ - "/home/" - "/var/lib" + initialize = true; + extraOptions = [ + "sftp.command='ssh backup@${dest}.r -i ${config.krebs.build.host.ssh.privkey.path} -s sftp'" ]; + repository = "sftp:backup@${dest}.r:/backups/blue"; passwordFile = (toString <secrets>) + "/restic/${dest}"; - repo = "sftp:backup@${dest}.r:/backups/blue"; - extraArguments = [ - "sftp.command='ssh backup@${dest}.r -i ${config.krebs.build.host.ssh.privkey.path} -s sftp'" + timerConfig = { OnCalendar = "00:05"; RandomizedDelaySec = "5h"; }; + paths = [ + "/home/" + "/var/lib" ]; - timerConfig = { - OnCalendar = "00:05"; - RandomizedDelaySec = "5h"; - }; }); + time.timeZone = "Europe/Berlin"; users.users.mainUser.openssh.authorizedKeys.keys = [ config.krebs.users.lass-android.pubkey ]; } |