feat: add restic

Signed-off-by: Lander Van den Bulcke <landervandenbulcke@gmail.com>
This commit is contained in:
Lander Van den Bulcke 2025-01-13 16:10:17 +01:00
parent 9f08d58e9f
commit fc668627ee
Signed by: lander
GPG key ID: 0142722B4B0C536F
5 changed files with 83 additions and 2 deletions

View file

@ -0,0 +1,40 @@
{ pkgs, config, ... }:
{
sops.secrets.restic-environment = {
owner = "root";
group = "root";
sopsFile = ./secrets.yaml;
};
sops.secrets.restic-password = {
owner = "root";
group = "root";
sopsFile = ./secrets.yaml;
};
sops.secrets.restic-repository = {
owner = "root";
group = "root";
sopsFile = ./secrets.yaml;
};
services.restic.backups = {
daily = {
initialize = true;
repositoryFile = config.sops.secrets.restic-repository.path;
passwordFile = config.sops.secrets.restic-password.path;
environmentFile = config.sops.secrets.restic-environment.path;
paths = [
config.users.users.lander.home
];
pruneOpts = [
"--keep-daily 7"
"--keep-weekly 5"
"--keep-weekly 12"
];
};
};
}