summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJohannes Kirschbauer <hsjobeki@gmail.com>2024-05-21 22:05:18 +0200
committerJohannes Kirschbauer <hsjobeki@gmail.com>2024-05-21 22:05:18 +0200
commit793ed729f2cfe0e387e1237d6aacd8770ce16509 (patch)
tree3b7e3ce863b172b97c669db6c0e5ea36a72be14e /lib
parentdoc: init lib.generators reference documentation (diff)
downloadnixpkgs-793ed729f2cfe0e387e1237d6aacd8770ce16509.tar.gz
doc: add arguments for toKeyValue
Diffstat (limited to 'lib')
-rw-r--r--lib/generators.nix16
1 files changed, 14 insertions, 2 deletions
diff --git a/lib/generators.nix b/lib/generators.nix
index 36891f9caedf..4317e49c2538 100644
--- a/lib/generators.nix
+++ b/lib/generators.nix
@@ -155,8 +155,20 @@ in rec {
/**
Generate a key-value-style config file from an attrset.
- *
- * mkKeyValue is the same as in toINI.
+
+ # Inputs
+
+ Structured function argument
+
+ : mkKeyValue (optional, default: `mkKeyValueDefault {} "="`)
+ : format a setting line from key and value
+
+ : listsAsDuplicateKeys (optional, default: `false`)
+ : allow lists as values for duplicate keys
+
+ : indent (optional, default: `""`)
+ : Initial indentation level
+
*/
toKeyValue = {
mkKeyValue ? mkKeyValueDefault {} "=",