summaryrefslogtreecommitdiff
path: root/nixos/lindy.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/lindy.nix')
-rw-r--r--nixos/lindy.nix32
1 files changed, 31 insertions, 1 deletions
diff --git a/nixos/lindy.nix b/nixos/lindy.nix
index 121f741..e6e8e2c 100644
--- a/nixos/lindy.nix
+++ b/nixos/lindy.nix
@@ -117,10 +117,40 @@ Komaru UUID=caf8496f-006b-4762-bb20-506d4c7bdb51 /nix/persist/root/komaru_key
# Zram
zramSwap.enable = true;
- # Backup
+ # Local backup (borg to Zonz)
services.cron.enable = true;
services.cron.systemCronJobs = [ "0 20 * * * root /media/Zonz/lindy/do-backup.sh" ];
+ # Remote backup (restic to infracoll)
+ services.restic.backups."infracoll" = {
+ repository = "s3:http://garage.isomorphis.me:3900/restic-lx";
+ environmentFile = "/nix/persist/etc/secrets/restic/infracoll/credentials";
+ passwordFile = "/nix/persist/etc/secrets/restic/infracoll/password";
+ paths = [
+ "/nix/persist"
+ "/home/lx"
+ # "/home/lx.old" # TODO cleanup this
+ # /media/Zonz/Private
+ # /media/Zonz/Stuff
+ ];
+ exclude = [
+ "/home/lx/.cache"
+ "/home/lx/.cargo"
+ "/home/lx/.local/share/Steam"
+ "/home/lx/Deuxfleurs/garage/tmp"
+ ];
+ timerConfig = {
+ OnCalendar = "21:30";
+ Persistent = true;
+ };
+ pruneOpts = [
+ "--keep-daily 7"
+ "--keep-weekly 5"
+ "--keep-monthly 12"
+ "--keep-yearly 75"
+ ];
+ };
+
# Graphics
specialisation = {
nvidia.configuration = {