feat: add restic

This commit is contained in:
lightly-toasted 2025-08-26 16:29:01 +09:00
parent f74e59d56b
commit 1f045e291d
2 changed files with 32 additions and 2 deletions

View file

@ -0,0 +1,27 @@
{ config, ... }:
{
sops.secrets."restic/password" = { };
sops.secrets."restic/rclone-config" = { };
services.restic.backups.gdrive = {
initialize = true;
inhibitsSleep = true;
passwordFile = config.sops.secrets."restic/password".path;
paths = [
"/data/Backup"
"/home/toast/workspace"
];
repository = "rclone:gdrive/restic";
rcloneConfigFile = config.sops.secrets."restic/rclone-config".path;
pruneOpts = [
"--keep-daily 7"
"--keep-weekly 3"
"--keep-monthly 3"
];
timerConfig = {
OnCalendar = "daily";
Persistent = true;
};
};
}