mirror of
https://github.com/lightly-toasted/nix-config.git
synced 2026-01-31 08:30:25 +00:00
- Migrate restic backup destination on nixos and vps to y2q rest-server - Split host-specific restic env secrets
33 lines
732 B
Nix
33 lines
732 B
Nix
{ config, ... }:
|
|
|
|
{
|
|
sops.secrets = {
|
|
"restic/password" = {};
|
|
"restic/env/vps" = {};
|
|
};
|
|
|
|
services.restic.backups.y2q = {
|
|
initialize = true;
|
|
inhibitsSleep = true;
|
|
passwordFile = config.sops.secrets."restic/password".path;
|
|
paths = [
|
|
"/var/lib/zipline"
|
|
"/var/lib/postgresql"
|
|
"/var/lib/forgejo"
|
|
"/var/lib/trilium"
|
|
"/var/lib/bitwarden_rs"
|
|
];
|
|
repository = "rest:http://restic.ts.700457.xyz/vps/";
|
|
environmentFile = config.sops.secrets."restic/env/vps".path;
|
|
pruneOpts = [
|
|
"--keep-hourly 3"
|
|
"--keep-daily 7"
|
|
"--keep-weekly 3"
|
|
"--keep-monthly 3"
|
|
];
|
|
timerConfig = {
|
|
OnCalendar = "hourly";
|
|
Persistent = true;
|
|
};
|
|
};
|
|
}
|