use rfc-style formatter

This commit is contained in:
cy 2024-12-19 02:32:58 -05:00
parent 993b457e0b
commit f57ed53bc5
30 changed files with 324 additions and 176 deletions

View file

@ -2,11 +2,29 @@
pkgs,
config,
...
}: {
}:
{
services.borgbackup.jobs = {
crashRsync = {
paths = ["/root" "/home" "/var/backup" "/var/lib" "/var/log" "/opt" "/etc" "/vw-data"];
exclude = ["**/.cache" "**/node_modules" "**/cache" "**/Cache" "/var/lib/docker" "/var/lib/containers/cache" "/var/lib/containers/overlay*"];
paths = [
"/root"
"/home"
"/var/backup"
"/var/lib"
"/var/log"
"/opt"
"/etc"
"/vw-data"
];
exclude = [
"**/.cache"
"**/node_modules"
"**/cache"
"**/Cache"
"/var/lib/docker"
"/var/lib/containers/cache"
"/var/lib/containers/overlay*"
];
repo = "de3911@de3911.rsync.net:borg/crash";
encryption = {
mode = "repokey-blake2";
@ -18,11 +36,13 @@
};
compression = "auto,zstd";
startAt = "hourly";
extraCreateArgs = ["--stats"];
extraCreateArgs = [ "--stats" ];
# warnings are often not that serious
failOnWarnings = false;
postHook = ''
${pkgs.curl}/bin/curl -u $(cat ${config.sops.secrets."services/ntfy".path}) -d "chunk: backup completed with exit code: $exitStatus
${pkgs.curl}/bin/curl -u $(cat ${
config.sops.secrets."services/ntfy".path
}) -d "chunk: backup completed with exit code: $exitStatus
$(journalctl -u borgbackup-job-crashRsync.service|tail -n 5)" \
https://ntfy.cything.io/chunk
'';