nixos-config/config/services/restic.nix

37 lines
890 B
Nix
Raw Normal View History

2024-05-06 08:58:52 +00:00
{config, ...}: {
2022-01-15 17:08:47 +00:00
services.restic.backups."sysbackup" = {
2024-05-06 08:58:52 +00:00
timerConfig = {
OnUnitActiveSec = "12h";
RandomizedDelaySec = "1d";
};
environmentFile = config.sops.secrets."security/restic/env".path;
2022-01-15 17:08:47 +00:00
paths = [
"/var"
"/home"
2024-07-28 06:20:04 +00:00
"/root"
2022-01-15 17:08:47 +00:00
];
2022-01-21 17:03:35 +00:00
extraBackupArgs = [
"--exclude-caches"
2022-09-13 08:18:37 +00:00
"--compression max"
"--exclude"
"/var/tmp"
"--exclude"
"/var/cache"
"--exclude"
"/root/.cache"
"--exclude"
"/home/darkkirb/.cache"
"--exclude"
2023-06-08 19:33:36 +00:00
"/var/lib/ipfs/root"
2022-01-21 17:03:35 +00:00
];
2024-05-06 11:44:58 +00:00
repository = "s3://ams1.vultrobjects.com/backup-chir-rs";
passwordFile = config.sops.secrets."security/restic/password".path;
2022-01-15 17:08:47 +00:00
};
2024-05-06 08:58:52 +00:00
sops.secrets."security/restic/env" = {
sopsFile = ../../secrets/shared.yaml;
};
2024-05-06 11:44:58 +00:00
sops.secrets."security/restic/password" = {
sopsFile = ../../secrets/shared.yaml;
};
2022-01-15 17:08:47 +00:00
}