dotfiles.nix/nixos/viridian/services/borgbackup/default.nix

42 lines
1.1 KiB
Nix
Raw Normal View History

2024-10-15 06:46:10 +08:00
{config, ...}: {
age.secrets.borgbackup = {
rekeyFile = ./passphrase.age;
};
2024-06-03 21:20:24 +08:00
2024-10-15 06:46:10 +08:00
services.borgbackup.jobs."borgbase" = {
paths = [
# Services
2024-10-16 04:59:59 +08:00
"/srv/minecraft"
"/srv/shares/sajenim"
"/srv/www/sajenim.dev"
"/var/lib/crowdsec"
"/var/lib/forgejo"
"/var/lib/paperless-ngx"
"/var/lib/postgresql"
"/var/lib/private/wiki-js"
"/var/lib/redis-paperless"
"/var/lib/traefik"
# Multimedia
"/srv/multimedia/containers/jellyfin"
"/srv/multimedia/containers/lidarr"
"/srv/multimedia/containers/prowlarr"
"/srv/multimedia/containers/qbittorrent"
"/srv/multimedia/containers/radarr"
"/srv/multimedia/containers/sonarr"
2024-10-15 06:46:10 +08:00
];
2024-10-01 17:35:42 +08:00
2024-10-15 06:46:10 +08:00
repo = "o93k24r6@o93k24r6.repo.borgbase.com:repo";
encryption = {
mode = "repokey-blake2";
passCommand = "cat ${config.age.secrets.traefik.path}";
2024-10-01 17:35:42 +08:00
};
2024-10-15 06:46:10 +08:00
environment.BORG_RSH = "ssh -i /etc/ssh/ssh_host_ed25519_key";
compression = "auto,lzma";
startAt = "daily";
2024-01-01 07:23:46 +08:00
};
2024-10-18 09:00:41 +08:00
programs.ssh.knownHostsFiles = [
./borgbase_hosts
];
2024-01-01 07:23:46 +08:00
}