Configure Restic backups to B2
This commit is contained in:
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"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user