From daef4f0972ca9fbc4ddb33fcf1bc3c6658c0e7da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki?= Date: Sun, 24 May 2020 20:13:17 +0100 Subject: [PATCH] add backups directly to b2 --- nixos/common-services.nix | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/nixos/common-services.nix b/nixos/common-services.nix index 9a544ade..0c36b599 100644 --- a/nixos/common-services.nix +++ b/nixos/common-services.nix @@ -31,12 +31,24 @@ nssmdns = true; }; - restic.backups.home = { - passwordFile = "/etc/nixos/secrets/restic-password"; + restic.backups.home-to-brix = { + passwordFile = "/etc/nixos/secrets/restic-password-brix"; paths = [ "/home" ]; repository = "rest:http://brix.local:8000/"; timerConfig = { OnCalendar = "hourly"; }; + extraBackupArgs = [ "--exclude='.cache'" "--exclude='.rustup'" ]; }; + + restic.backups.home-to-b2 = { + passwordFile = "/etc/nixos/secrets/restic-password-b2"; + paths = [ "/home" ]; + repository = "b2:cyplo-restic-foureighty:/"; + timerConfig = { OnCalendar = "hourly"; }; + extraBackupArgs = [ "--exclude='.cache'" "--exclude='.rustup'" ]; + pruneOpts = [ "--keep-daily 8" "--keep-weekly 5" "--keep-monthly 13" "--keep-yearly 16" ]; + s3CredentialsFile = "/etc/nixos/secrets/b2"; + }; + geoclue2.enable = true; xserver = { enable = true;