nix-config/hosts/nixos/modules/services/restic.nix
lightly-toasted efd61adc07 feat: migrate backup destination to dedicated rest-server
- Migrate restic backup destination on nixos and vps to y2q rest-server
- Split host-specific restic env secrets
2026-01-17 21:02:27 +09:00

31 lines
690 B
Nix

{ config, ... }:
{
sops.secrets = {
"restic/password" = {};
"restic/env/nixos" = {};
};
services.restic.backups.y2q = {
initialize = true;
inhibitsSleep = true;
passwordFile = config.sops.secrets."restic/password".path;
paths = [
"/data/Backup"
"/home/toast/workspace"
];
exclude = [ "node_modules" ];
repository = "rest:http://restic.ts.700457.xyz/nixos/";
environmentFile = config.sops.secrets."restic/env/nixos".path;
pruneOpts = [
"--keep-hourly 6"
"--keep-daily 7"
"--keep-weekly 3"
"--keep-monthly 3"
];
timerConfig = {
OnCalendar = "hourly";
Persistent = true;
};
};
}