refactor(dotfiles): inline registry join
This commit is contained in:
1 parent
e49dcb67dc
commit
8fa11b85fd
1 file changed
+7
-9
@@ -59,16 +59,14 @@ let
|
||||
|
||||
rawDeclarations =
|
||||
registryName: lib.mapAttrs (_hostName: host: host.config.registry.${registryName} or { }) hosts;
|
||||
|
||||
join =
|
||||
registry: host: entry:
|
||||
lib.filterAttrs (_name: value: value != null) (
|
||||
lib.mapAttrs (
|
||||
registryName: _registry: (registry.${registryName}.${host} or { }).${entry} or null
|
||||
) definitions
|
||||
);
|
||||
in
|
||||
collectData
|
||||
// {
|
||||
join = host: entry: join collectData host entry;
|
||||
join =
|
||||
host: entry:
|
||||
lib.filterAttrs (_name: value: value != null) (
|
||||
lib.mapAttrs (
|
||||
registryName: _registry: (collectData.${registryName}.${host} or { }).${entry} or null
|
||||
) definitions
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user