From a436cdbc78a13fac85df9950f14e5093a3668ed2 Mon Sep 17 00:00:00 2001 From: chaos Date: Sat, 20 Jul 2024 12:46:35 +0100 Subject: [PATCH] add restic-all --- hosts/hetzner-arm/profiles/restic.nix | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/hosts/hetzner-arm/profiles/restic.nix b/hosts/hetzner-arm/profiles/restic.nix index 85ba2f2..7d68c09 100644 --- a/hosts/hetzner-arm/profiles/restic.nix +++ b/hosts/hetzner-arm/profiles/restic.nix @@ -1,14 +1,28 @@ { self, pkgs, + lib, config, ... }: let + inherit (lib.lists) forEach; + inherit (config.services.secrets) secrets; backupSchedules = import "${self}/data/backupSchedules.nix"; repoRoot = "s3:s3.eu-central-003.backblazeb2.com/Chaos-Backups/Restic"; in { + environment.systemPackages = [ + # TODO: add ones in container too + (pkgs.writeShellScriptBin "restic-all" '' + ${(forEach [ + "social" + ] ( + name: "restic-${name} $@" + ))} + '') + ]; + services.restic.backups = { social = { user = "root";