diff --git a/hosts/nixos/nfss/system.nix b/hosts/nixos/nfss/system.nix index a09e271..43a1041 100644 --- a/hosts/nixos/nfss/system.nix +++ b/hosts/nixos/nfss/system.nix @@ -155,6 +155,10 @@ repositoryUrl = "ssh://borg-box/./nfss"; backupPaths = [ "/var/lib/mongodb" + "/home/yanlin/Archive" + "/home/yanlin/Credentials" + "/home/yanlin/Documents" + "/home/yanlin/Media" ]; backupFrequency = "*-*-* 01:00:00"; retention = { diff --git a/modules/borg/client.nix b/modules/borg/client.nix index caa3046..b550260 100644 --- a/modules/borg/client.nix +++ b/modules/borg/client.nix @@ -10,12 +10,10 @@ let sshCommand = "ssh -F /home/yanlin/.ssh/config -o StrictHostKeyChecking=accept-new -o ServerAliveInterval=60 -o ServerAliveCountMax=240"; passphraseFile = "/etc/borg-passphrase"; excludePatterns = [ - "*.tmp" "*.temp" "*/.cache/*" "*/.local/share/Trash/*" "*/tmp/*" "*/temp/*" - "/proc/*" "/sys/*" "/dev/*" "/run/*" "/var/tmp/*" "/var/cache/*" "/var/log/*" - "*/overlay2/*" "*/containers/storage/overlay/*" - ".DS_Store" "._.DS_Store" ".Spotlight-V100" ".TemporaryItems" ".Trashes" ".fseventsd" - "node_modules/*" "target/*" "*.o" "*.so" "*.pyc" "__pycache__/*" - ".vscode/*" "*.swp" "*.swo" "*~" + "**/.stversions/" # Syncthing versioning folders + "**/.Trash/" + "**/.Trash-*/" + "**/.local/share/Trash/" ]; excludeArgs = concatMapStrings (pattern: " --exclude '${pattern}'") excludePatterns; in