toGitINI
lib.generators.toGitINI
Docs pulled from | This Revision | 29 minutes ago
Nixpkgs manual
Generate a git-config file from an attrset.
It has two major differences from the regular INI format:
- values are indented with tabs
- sections can have sub-sections
Further: git-config examples
Examples
lib.generators.toGitINI usage example
generators.toGitINI {
url."ssh://[email protected]/".insteadOf = "https://github.com";
user.name = "edolstra";
}
> [url "ssh://[email protected]/"]
> insteadOf = "https://github.com"
>
> [user]
> name = "edolstra"
Inputs
attrs-
Key-value pairs to be converted to a git-config file. See the git-config documentation for possible values.
Noogle detected
Implementation
The following is the current implementation of this function.
attrs: toINI_ (gitFlattenAttrs attrs)