mirror of
https://github.com/Death916/nixconfig.git
synced 2026-04-11 04:48:25 -07:00
restic
This commit is contained in:
parent
abf04894d5
commit
c6e28fff4b
1 changed files with 80 additions and 0 deletions
80
modules/nixos/laptop/restic.nix
Normal file
80
modules/nixos/laptop/restic.nix
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
# Restic secrets / passwords
|
||||
sops.secrets = {
|
||||
};
|
||||
|
||||
services.restic.backups = {
|
||||
laptop-backups = {
|
||||
initialize = true;
|
||||
paths = [
|
||||
"/etc"
|
||||
"/srv"
|
||||
"/var/log"
|
||||
"/home/"
|
||||
"/var/lib/"
|
||||
"/root/"
|
||||
"/storage"
|
||||
];
|
||||
repository = "s3:s3.us-west-000.backblazeb2.com";
|
||||
environmentFile = config.sops.secrets."restic/B2-Backblaze/environment".path;
|
||||
timerConfig = {
|
||||
OnCalendar = "weekly";
|
||||
Persistent = true;
|
||||
};
|
||||
extraBackupArgs = [
|
||||
"--verbose"
|
||||
"--exclude-caches"
|
||||
];
|
||||
pruneOpts = [
|
||||
"--keep-weekly 4"
|
||||
"--keep-monthly 6"
|
||||
"--keep-yearly 3"
|
||||
];
|
||||
};
|
||||
|
||||
home-folder = {
|
||||
initialize = true;
|
||||
paths = [ "/home/death916/Desktop" ];
|
||||
repository = "b2:nuc-server-B2-Docker:/";
|
||||
environmentFile = config.sops.secrets."restic/B2-Docker/environment".path;
|
||||
passwordFile = config.sops.secrets."restic/B2-Docker/password".path;
|
||||
timerConfig = {
|
||||
OnCalendar = "daily";
|
||||
Persistent = true;
|
||||
};
|
||||
extraBackupArgs = [
|
||||
"--verbose"
|
||||
"--exclude-caches"
|
||||
];
|
||||
pruneOpts = [
|
||||
"--keep-daily 7"
|
||||
"--keep-weekly 8"
|
||||
"--keep-monthly 6"
|
||||
"--keep-yearly 1"
|
||||
];
|
||||
};
|
||||
|
||||
B2-Photos = {
|
||||
initialize = true;
|
||||
paths = [ "/Storage/Media/Pictures" ];
|
||||
repository = "b2:nuc-server-B2-Photos:/";
|
||||
environmentFile = config.sops.secrets."restic/B2-Photos/environment".path;
|
||||
passwordFile = config.sops.secrets."restic/B2-Photos/password".path;
|
||||
timerConfig = {
|
||||
OnCalendar = "weekly";
|
||||
Persistent = true;
|
||||
};
|
||||
extraBackupArgs = [
|
||||
"--verbose"
|
||||
"--exclude-caches"
|
||||
];
|
||||
pruneOpts = [
|
||||
"--keep-weekly 8"
|
||||
"--keep-monthly 12"
|
||||
"--keep-yearly 5"
|
||||
];
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue