Make backups only include /home

This commit is contained in:
Riley Apeldoorn 2023-06-17 07:32:00 +02:00
parent f189a59a9c
commit 6f25ceba0c
2 changed files with 8 additions and 5 deletions

Binary file not shown.

View file

@ -15,19 +15,22 @@ in with lib; {
services.duplicity = { services.duplicity = {
enable = true; enable = true;
secretFile = config.age.secrets."backblaze".path; secretFile = config.age.secrets."backblaze".path;
include = [ frequency = null; # We set this later
"/home" root = "/home";
]; fullIfOlderThan = "1M";
exclude = [ exclude = [
"/home/**/.config" "/home/**/.config"
"/home/**/.cache" "/home/**/.cache"
"/home/**/.cargo" "/home/**/.cargo"
"/home/**/.local"
# NixOS configuration, we keep that elsewhere. # NixOS configuration, we keep that elsewhere.
"/home/**/os" "/home/**/os"
]; ];
targetUrl = "b2://005c7170636d5ef0000000001@${cfg.bucket}"; targetUrl = "b2://005c7170636d5ef0000000001@${cfg.bucket}";
}; };
systemd.services.duplicity.wants = ["network.target"];
systemd.timers.duplicity.timerConfig."OnBootSec" = "20m";
systemd.timers.duplicity.timerConfig."OnCalendar" = "daily";
systemd.timers.duplicity.timerConfig."Persistent" = true;
}; };
} }