{ config, lib, ... }:

{
  services.restic.backups = {
    backblaze = {
      initialize = true;
      passwordFile = "/secrets/restic/data.key";
      environmentFile = "/secrets/restic/credentials.txt";
      repository = "b2:architect:/";
      paths = [ "/var/lib" "/secrets" "/services" ];
      pruneOpts = [
        "--keep-daily 45"
        "--keep-weekly 12"
        "--keep-monthly 12"
        "--keep-yearly 3"
      ];
      timerConfig = {
        OnCalendar = "monday 03:00";
        RandomizedDelaySec = "1h";
      };
    };
  };
}