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 ${} "$@" + '') + ]; }