backups: storeName -> repoName

This commit is contained in:
teutat3s 2024-08-28 16:58:35 +02:00
parent 751d82f7e3
commit 1d92ef53ca
Signed by untrusted user: teutat3s
GPG key ID: 4FA1D3FA524F22C1

View file

@ -258,15 +258,15 @@ in
repos = config.pub-solar-os.backups.repos;
restic = config.pub-solar-os.backups.restic;
storeNames = builtins.attrNames repos;
repoNames = builtins.attrNames repos;
backupNames = builtins.attrNames restic;
createBackups =
backupName:
map (storeName: {
name = "${backupName}-${storeName}";
value = repos."${storeName}" // restic."${backupName}";
}) storeNames;
map (repoName: {
name = "${backupName}-${repoName}";
value = repos."${repoName}" // restic."${backupName}";
}) repoNames;
in
builtins.listToAttrs (lib.lists.flatten (map createBackups backupNames));