mirror of
https://github.com/lightly-toasted/nix-config.git
synced 2025-10-04 11:35:41 +00:00
feat: add restic
This commit is contained in:
parent
f74e59d56b
commit
1f045e291d
2 changed files with 32 additions and 2 deletions
27
hosts/nixos/modules/services/restic.nix
Normal file
27
hosts/nixos/modules/services/restic.nix
Normal 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;
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue