Skip to content

Commit

Permalink
set up borg backups
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianHicks committed Sep 7, 2021
1 parent 967580f commit 305df00
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions nixos/brian/default.nix
Expand Up @@ -15,4 +15,39 @@
useUserPackages = true;
users.brian = import ../../dotfiles;
};

services.borgbackup.jobs.brian-home = {
user = "brian";
group = "";

repo = "ipi51989@ipi51989.repo.borgbase.com:repo";

startAt = "hourly";

paths = "/home/brian";
exclude = [
"/home/*/.cache"
"/home/*/.cargo"
"/home/*/.compose-cache"
"/home/*/.config/chromium"
"/home/*/.dropbox"
"/home/*/Dropbox"
];
compression = "auto,zlib,6";

encryption.mode = "repokey-blake2";
encryption.passCommand =
"cat /home/brian/.ssh/borgbase-brian-home-encryption-key";

environment.BORG_RSH = "ssh -i /home/brian/.ssh/borgbase_ed25519";

extraCreateArgs = "--stats";

prune.keep = {
within = "1d";
daily = 7;
weekly = 4;
monthly = -1; # keep one from each month
};
};
}

0 comments on commit 305df00

Please sign in to comment.