From 793ed729f2cfe0e387e1237d6aacd8770ce16509 Mon Sep 17 00:00:00 2001 From: Johannes Kirschbauer Date: Tue, 21 May 2024 22:05:18 +0200 Subject: [PATCH] doc: add arguments for toKeyValue --- lib/generators.nix | 16 ++++++++++++++-- 1 file 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 {} "=",