Configure Restic backups to B2
This commit is contained in:
parent
77cb87fa99
commit
b9cf8dedf8
1 changed files with 17 additions and 2 deletions
19
backup.nix
19
backup.nix
|
|
@ -1,4 +1,19 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, config, ... }:
|
||||||
{
|
{
|
||||||
environment.systemPackages = [pkgs.backblaze-b2];
|
environment.systemPackages = [pkgs.restic];
|
||||||
|
|
||||||
|
services.restic.backups = {
|
||||||
|
b2 = {
|
||||||
|
initialize = true;
|
||||||
|
environmentFile = "/etc/restic-env";
|
||||||
|
repository = "b2:marauder-backup";
|
||||||
|
passwordFile = "/etc/restic-password";
|
||||||
|
paths = [config.users.users.nettika.home];
|
||||||
|
pruneOpts = [
|
||||||
|
"--keep-daily 7"
|
||||||
|
"--keep-weekly 5"
|
||||||
|
"--keep-monthly 12"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue