mirror of
https://github.com/lightly-toasted/nix-config.git
synced 2025-12-10 03:49:44 +00:00
31 lines
666 B
Nix
31 lines
666 B
Nix
{ config, ... }:
|
|
|
|
{
|
|
sops.secrets = {
|
|
"restic/password" = {};
|
|
"restic/env" = {};
|
|
};
|
|
|
|
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://y2q:9000/nixos/";
|
|
environmentFile = config.sops.secrets."restic/env".path;
|
|
pruneOpts = [
|
|
"--keep-hourly 6"
|
|
"--keep-daily 7"
|
|
"--keep-weekly 3"
|
|
"--keep-monthly 3"
|
|
];
|
|
timerConfig = {
|
|
OnCalendar = "hourly";
|
|
Persistent = true;
|
|
};
|
|
};
|
|
}
|