59 lines
1.4 KiB
Nix
59 lines
1.4 KiB
Nix
{
|
|
pkgs,
|
|
config,
|
|
...
|
|
}: {
|
|
age.secrets = {
|
|
pingbox_backup_s3_creds.file = ../../../secrets/pingbox_backup_s3_creds.age;
|
|
pingbox_backup_repo_password.file = ../../../secrets/pingbox_backup_repo_password.age;
|
|
};
|
|
|
|
services.restic.backups = {
|
|
"system" = {
|
|
initialize = true;
|
|
passwordFile = config.age.secrets.pingbox_backup_repo_password.path;
|
|
timerConfig = {
|
|
OnCalendar = "daily";
|
|
Persistent = true;
|
|
RandomizedDelaySec = "15m";
|
|
};
|
|
repository = "s3:s3.eu-central-003.backblazeb2.com/pingbox-backup";
|
|
environmentFile = config.age.secrets.pingbox_backup_s3_creds.path;
|
|
progressFps = 0.1;
|
|
|
|
paths = [
|
|
"/etc/ssh"
|
|
"/etc/NetworkManager/system-connections"
|
|
|
|
"/home"
|
|
"/var/backup"
|
|
];
|
|
|
|
exclude = [
|
|
"/home/*/.cache"
|
|
"/home/*/.local/share/Trash"
|
|
"/var/cache"
|
|
"/var/tmp"
|
|
|
|
"/home/*/.nix-profile"
|
|
"/home/*/.nix-defexpr"
|
|
|
|
"/home/*/.rustup"
|
|
"/home/*/.cargo/registry"
|
|
"/home/*/.cargo/git"
|
|
"/home/*/.npm"
|
|
"/home/*/.bun"
|
|
"/home/*/.hex"
|
|
"/home/*/.go/pkg"
|
|
"/home/*/.android/avd"
|
|
|
|
"/home/*/.steam/root/steamapps"
|
|
"/home/*/.local/share/Steam/steamapps"
|
|
"/home/*/.steam/steam/steamapps"
|
|
];
|
|
backupPrepareCommand = ''
|
|
'';
|
|
};
|
|
};
|
|
}
|