From 59c420e8b024ae523f0514409041e2c0278bd7a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kier=C3=A1n=20Meinhardt?= Date: Tue, 18 Jan 2022 22:38:28 +0100 Subject: [PATCH] feat(restic): add wrapper command --- configs/backup.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/configs/backup.nix b/configs/backup.nix index 023386f..7e15129 100644 --- a/configs/backup.nix +++ b/configs/backup.nix @@ -1,11 +1,21 @@ +{ pkgs, config, ... }: +let + repository = "rest:http://zaatar.r:3571/"; +in { services.restic.backups.niveum = { initialize = true; - repository = "rest:http://zaatar.r:3571/"; + inherit repository; timerConfig = { OnCalendar = "00:05"; RandomizedDelaySec = "5h"; }; passwordFile = toString ; paths = [ "/home/kfm/work" ]; }; + + environment.systemPackages = [ + (pkgs.writers.writeDashBin "restic-niveum" '' + ${pkgs.restic}/bin/restic -r ${repository} -p ${} "$@" + '') + ]; }