From f6585da4b7311095d38251736670fecfc34288e1 Mon Sep 17 00:00:00 2001 From: Weckyy702 Date: Thu, 2 Apr 2026 13:45:34 +0200 Subject: [PATCH] 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 --- modules/services/borgmatic.nix | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/modules/services/borgmatic.nix b/modules/services/borgmatic.nix index 277acd8..7f7923f 100644 --- a/modules/services/borgmatic.nix +++ b/modules/services/borgmatic.nix @@ -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";