add restic-all

This commit is contained in:
chaos 2024-07-20 12:46:35 +01:00
parent 644ff711db
commit a436cdbc78
No known key found for this signature in database

View file

@ -1,14 +1,28 @@
{ {
self, self,
pkgs, pkgs,
lib,
config, config,
... ...
}: let }: let
inherit (lib.lists) forEach;
inherit (config.services.secrets) secrets; inherit (config.services.secrets) secrets;
backupSchedules = import "${self}/data/backupSchedules.nix"; backupSchedules = import "${self}/data/backupSchedules.nix";
repoRoot = "s3:s3.eu-central-003.backblazeb2.com/Chaos-Backups/Restic"; repoRoot = "s3:s3.eu-central-003.backblazeb2.com/Chaos-Backups/Restic";
in { in {
environment.systemPackages = [
# TODO: add ones in container too
(pkgs.writeShellScriptBin "restic-all" ''
${(forEach [
"social"
] (
name: "restic-${name} $@"
))}
'')
];
services.restic.backups = { services.restic.backups = {
social = { social = {
user = "root"; user = "root";