setAttrByPath
lib.setAttrByPath
Docs pulled from | This Revision | 17 minutes ago
Create a new attribute set with value
set at the nested attribute location specified in attrPath
.
Inputs
attrPath
-
A list of strings representing the attribute path to set
value
-
The value to set at the location described by
attrPath
Type
setAttrByPath :: [String] -> Any -> AttrSet
Examples
lib.attrsets.setAttrByPath
usage example
setAttrByPath ["a" "b"] 3
=> { a = { b = 3; }; }