backups: storeName -> repoName
This commit is contained in:
parent
751d82f7e3
commit
1d92ef53ca
|
@ -258,15 +258,15 @@ in
|
||||||
repos = config.pub-solar-os.backups.repos;
|
repos = config.pub-solar-os.backups.repos;
|
||||||
restic = config.pub-solar-os.backups.restic;
|
restic = config.pub-solar-os.backups.restic;
|
||||||
|
|
||||||
storeNames = builtins.attrNames repos;
|
repoNames = builtins.attrNames repos;
|
||||||
backupNames = builtins.attrNames restic;
|
backupNames = builtins.attrNames restic;
|
||||||
|
|
||||||
createBackups =
|
createBackups =
|
||||||
backupName:
|
backupName:
|
||||||
map (storeName: {
|
map (repoName: {
|
||||||
name = "${backupName}-${storeName}";
|
name = "${backupName}-${repoName}";
|
||||||
value = repos."${storeName}" // restic."${backupName}";
|
value = repos."${repoName}" // restic."${backupName}";
|
||||||
}) storeNames;
|
}) repoNames;
|
||||||
|
|
||||||
in
|
in
|
||||||
builtins.listToAttrs (lib.lists.flatten (map createBackups backupNames));
|
builtins.listToAttrs (lib.lists.flatten (map createBackups backupNames));
|
||||||
|
|
Loading…
Reference in a new issue