diff --git a/services/restic/home-pc.nix b/services/restic/home-pc.nix index 56cf1a3..af5c78e 100644 --- a/services/restic/home-pc.nix +++ b/services/restic/home-pc.nix @@ -15,6 +15,7 @@ in { services.restic.backups.full = resticLib.resticConfig { name = "home-pc"; paths = [ "/etc/nixos" "/var/lib" "/home" ]; + # inspiration: https://github.com/rubo77/rsync-homedir-excludes ignorePatterns = [ "/var/lib/systemd" "/var/lib/libvirt" @@ -24,26 +25,69 @@ in { "/var/lib/docker" "/var/lib/flatpak" "/home/*/Downloads" + "/home/*/Pictures" + "/home/*/Videos" + "/home/*/Music" "/home/*/Games" + "/home/*/.android" + "/home/*/.AndroidStudio*" "/home/*/.cache" "/home/*/.cargo" + "/home/*/.compose-cache" + "/home/*/.dotnet" + "/home/*/.gradle" + "/home/*/.mozilla" "/home/*/.npm" "/home/*/.nuget" + "/home/*/.rustup" "/home/*/.steam" + "/home/*/.templateengine" "/home/*/.var" - "/home/*/.local/share/Trash" - "/home/*/.local/share/libvirt" + "/home/*/.wine" "/home/*/.local/share/containers" "/home/*/.local/share/docker" "/home/*/.local/share/flatpak" "/home/*/.local/share/bottles" "/home/*/.local/share/Steam" + "/home/*/.local/share/keybase" + "/home/*/.local/share/libvirt" "/home/*/.local/share/lutris" "/home/*/.local/share/NuGet" + "/home/*/.local/share/tor-browser" + "/home/*/.local/share/Trash" + "/home/*/.config/BraveSoftware" + "/home/*/.config/chromium" + "/home/*/.config/gatsby" "/home/*/.config/libvirt" + "/home/*/.config/spotify/Users" "/home/felschr/media" "/home/felschr/keybase" "/home/felschr/dev" # backup ~/dev-backup instead + + # general + ".cache" + "cache" + ".tmp" + ".temp" + "tmp" + "temp" + ".log" + "log" + ".Trash" + + # electron apps + "/home/*/.config/**/blob_storage" + "/home/*/.config/**/Application Cache" + "/home/*/.config/**/Cache" + "/home/*/.config/**/CachedData" + "/home/*/.config/**/Code Cache" + "/home/*/.config/**/GPUCache" + "/home/*/.var/app/**/blob_storage" + "/home/*/.var/app/**/Application Cache" + "/home/*/.var/app/**/Cache" + "/home/*/.var/app/**/CachedData" + "/home/*/.var/app/**/Code Cache" + "/home/*/.var/app/**/GPUCache" ]; timerConfig.OnCalendar = "0/4:00:00"; extraPruneOpts = [ "--keep-last 6" ]; diff --git a/services/restic/home-server.nix b/services/restic/home-server.nix index b9f5c8b..c905f6c 100644 --- a/services/restic/home-server.nix +++ b/services/restic/home-server.nix @@ -27,6 +27,17 @@ in { "/home/*/.local/share/containers" "/home/*/.local/share/Trash" "/var/lib/jellyfin/transcodes" + + # general + ".cache" + "cache" + ".tmp" + ".temp" + "tmp" + "temp" + ".log" + "log" + ".Trash" ]; timerConfig.OnCalendar = "0/4:00:00"; extraPruneOpts = [ "--keep-last 6" ];