From f1a77181e7664b0690730df6830f1500f3425a23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Av=C3=A9?= Date: Mon, 10 Jun 2024 13:21:53 +0000 Subject: [PATCH] Mon Jun 10 01:21:53 PM UTC 2024 --- home/Vault.nix | 39 ++++++++++++++++++++++++++++----------- 1 file changed, 28 insertions(+), 11 deletions(-) diff --git a/home/Vault.nix b/home/Vault.nix index f4e7c1d..c531240 100644 --- a/home/Vault.nix +++ b/home/Vault.nix @@ -64,13 +64,34 @@ let fi ''); }; - # backup = { - # when = "*-*-* 04:00:00"; - # script = toString (pkgs.writeShellScript "script" '' - # ${./scripts/files/backup.sh} - # ${pkgs.curl}/bin/curl https://uptime.thomasave.be/api/push/R6iJcWqGp0 - # ''); - # }; + restic_etienne = { + when = "*-*-* 01:00:00"; + script = toString (pkgs.writeShellScript "script" '' + /Backup/Restic/Etienne/run.sh + ${pkgs.curl}/bin/curl https://uptime.thomasave.be/api/push/zGPrOi0NsJ + ''); + }; + restic_magda_and_etienne = { + when = "*-*-* 03:00:00"; + script = toString (pkgs.writeShellScript "script" '' + /Backup/Restic/Magda\ and\ Etienne/run.sh + ${pkgs.curl}/bin/curl https://uptime.thomasave.be/api/push/yvBuDgduDd + ''); + }; + restic_backblaze = { + when = "*-*-* 02:00:00"; + script = toString (pkgs.writeShellScript "script" '' + /Backup/Restic/BackBlaze/run.sh + ${pkgs.curl}/bin/curl https://uptime.thomasave.be/api/push/LVruVYTwTn + ''); + }; + mail_sync = { + when = "*-*-* 04:00:00"; + script = toString (pkgs.writeShellScript "script" '' + cd /home/server/Containers/Mails && docker compose up sync-etienne sync-magda + ${pkgs.curl}/bin/curl https://uptime.thomasave.be/api/push/eEIPVGyrAx + ''); + }; }; in { home.username = "server"; @@ -99,9 +120,5 @@ in { systemd.user.timers = pkgs.lib.mapAttrs mkTimer scripts; # Don't forget to enable these timers! Or reboot, after which it should also be activated automatically - # systemctl --user enable --now backup.timer - # systemctl --user enable --now sync_vault.timer - # systemctl --user enable --now mbsync.timer - # systemctl --user enable --now vdirsyncer.timer # systemctl --user enable --now disk_check.timer }