infrastructure/hosts/neodymium/services/borgbackup/default.nix

47 lines
1.1 KiB
Nix
Raw Normal View History

2023-12-15 15:18:36 +00:00
{config, ...}: {
services.borgbackup.jobs.home = {
paths = "/home/laurent/";
repo = "/mnt/home_backup";
exclude = [
# Largest cache dirs
".cache"
".compose-cache"
"*/cache"
"*/cache2" # firefox
"*/Cache"
"*/Code Cache"
"*/blob_storage"
".config/Slack/logs"
".config/Code/CachedData"
".container-diff"
".npm/_cacache"
# Work related dirs
"*/node_modules"
"*/bower_components"
"*/build"
"*/_build"
"*/.tox"
"*/venv"
"*/.venv"
"*/.direnv"
];
encryption = {
mode = "repokey";
passCommand = "cat ${config.age.secrets.borgbackup.path}";
};
compression = "auto,zstd";
2023-12-15 15:18:36 +00:00
startAt = [];
};
services.borgbackup.jobs.keepass = {
paths = "/home/laurent/Documents/db_mdp.kdbx";
repo = "ssh://root@fainsin.bzh:624/srv/backup/keepass";
user = "laurent";
encryption = {
mode = "repokey";
passCommand = "cat ${config.age.secrets.borgbackup.path}";
};
compression = "auto,zstd";
startAt = "daily";
};
}