concat strings in restic-all

This commit is contained in:
chaos 2024-07-20 12:48:21 +01:00
parent a436cdbc78
commit 9ff90d6251
No known key found for this signature in database

View file

@ -6,6 +6,7 @@
... ...
}: let }: let
inherit (lib.lists) forEach; inherit (lib.lists) forEach;
inherit (lib.strings) concatStringsSep;
inherit (config.services.secrets) secrets; inherit (config.services.secrets) secrets;
backupSchedules = import "${self}/data/backupSchedules.nix"; backupSchedules = import "${self}/data/backupSchedules.nix";
@ -14,13 +15,13 @@
in { in {
environment.systemPackages = [ environment.systemPackages = [
# TODO: add ones in container too # TODO: add ones in container too
(pkgs.writeShellScriptBin "restic-all" '' (concatStringsSep "\n" (pkgs.writeShellScriptBin "restic-all" ''
${(forEach [ ${(forEach [
"social" "social"
] ( ] (
name: "restic-${name} $@" name: "restic-${name} $@"
))} ))}
'') ''))
]; ];
services.restic.backups = { services.restic.backups = {