nix/nixos/t14/backups.nix
2025-09-11 23:50:17 -05:00

37 lines
912 B
Nix

{ config, ... }:
{
sops = {
defaultSopsFile = ../../secrets/restic.yaml;
age.keyFile = "/home/e/.config/sops/age/keys.txt";
secrets = {
"b2-home/env" = { };
"b2-home/repo" = { };
"b2-home/password" = { };
};
};
services.restic.backups = {
b2-home = {
initialize = true;
environmentFile = config.sops.secrets."b2-home/env".path;
repositoryFile = config.sops.secrets."b2-home/repo".path;
passwordFile = config.sops.secrets."b2-home/password".path;
paths = [
"/home/e/backmeup"
"/home/e/orgfiles"
"/home/e/.ssh"
"/home/e/.librewolf"
"/home/e/.runelite"
"/home/e/.local/share/PrismLauncher/instances"
];
timerConfig = {
OnCalendar = "01:00";
};
pruneOpts = [
"--keep-daily 14"
"--keep-monthly 6"
"--keep-yearly 1"
];
};
};
}