borgmatic: Rework borgmatic config to be a little less silly

Instead of globally excluding by pattern, exclude directories that
contain a .borgignore file

This makes the borg config more scalable across different setups
This commit is contained in:
2026-04-02 13:45:34 +02:00
parent 64336e8f9f
commit f6585da4b7

View File

@@ -30,14 +30,10 @@
patterns = [
#TODO: home.homeDirectory might be usable here
#TODO: should be user and machine specific
"R /home/${username}/Documents"
"R /home/${username}/.ssh"
"- /home/${username}/Documents/SteamLibrary"
"- /home/${username}/Documents/PrismLauncher instances"
"- /home/${username}/Documents/.Trash-1000"
"- /home/${username}/Documents/VMs/Data"
"R /home/${username}"
"+ /home/${username}/.ssh"
"- /home/${username}/.*"
"- **/node_modules"
"- **/.git"
"- **/.cache"
"- **/*build"
"- **/target"
@@ -48,6 +44,8 @@
"- **/dist"
"- **/.pio"
];
extraConfig.exclude_if_present = [ ".borgignore" ];
};
retention.keepWeekly = 2;
storage.extraConfig.ssh_command = "ssh -i /home/${username}/.ssh/id_ed25519_borg";