homeFilesFromStringAttrs: merge lists into single attrset
This commit is contained in:
@@ -22,11 +22,11 @@
|
|||||||
|
|
||||||
setAttrByStrPath = strPath: value: nixpkgs.lib.setAttrByPath (nixpkgs.lib.strings.splitString "." strPath) value;
|
setAttrByStrPath = strPath: value: nixpkgs.lib.setAttrByPath (nixpkgs.lib.strings.splitString "." strPath) value;
|
||||||
|
|
||||||
homeFilesFromStringAttrs = { dir, attrs, exec ? false }: map (x: (map (y: {
|
homeFilesFromStringAttrs = { dir, attrs, exec ? false }: nixpkgs.lib.mergeAttrsList (map (x: nixpkgs.lib.mergeAttrsList (map (y: {
|
||||||
"${dir}/${x}" = {
|
"${dir}/${x}" = {
|
||||||
text = y;
|
text = y;
|
||||||
executable = exec;
|
executable = exec;
|
||||||
};
|
};
|
||||||
}) (builtins.attrValues attrs)) ) (builtins.attrNames attrs);
|
}) (builtins.attrValues attrs)) ) (builtins.attrNames attrs));
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user