From 9ff90d6251e7a85d32e6feab462c7c16817cbe8e Mon Sep 17 00:00:00 2001 From: chaos Date: Sat, 20 Jul 2024 12:48:21 +0100 Subject: [PATCH] concat strings in restic-all --- hosts/hetzner-arm/profiles/restic.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hosts/hetzner-arm/profiles/restic.nix b/hosts/hetzner-arm/profiles/restic.nix index 7d68c09..9c23b93 100644 --- a/hosts/hetzner-arm/profiles/restic.nix +++ b/hosts/hetzner-arm/profiles/restic.nix @@ -6,6 +6,7 @@ ... }: let inherit (lib.lists) forEach; + inherit (lib.strings) concatStringsSep; inherit (config.services.secrets) secrets; backupSchedules = import "${self}/data/backupSchedules.nix"; @@ -14,13 +15,13 @@ in { environment.systemPackages = [ # TODO: add ones in container too - (pkgs.writeShellScriptBin "restic-all" '' + (concatStringsSep "\n" (pkgs.writeShellScriptBin "restic-all" '' ${(forEach [ "social" ] ( name: "restic-${name} $@" ))} - '') + '')) ]; services.restic.backups = {