Commit ce54db6f authored by Artturin's avatar Artturin
Browse files

lib.generators.toINIWithGlobalSection: give sections a default

often sections aren't needed when using globalSection

currently one has to `sections = { }` when using only globalSection

```
lib.generators.toINIWithGlobalSection { } {
  globalSection = {
    background_color = "1d202199";
  };
  sections = { };
};
````
parent 7076a89d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -168,7 +168,7 @@ rec {
    mkKeyValue    ? mkKeyValueDefault {} "=",
    # allow lists as values for duplicate keys
    listsAsDuplicateKeys ? false
  }: { globalSection, sections }:
  }: { globalSection, sections ? {} }:
    ( if globalSection == {}
      then ""
      else (toKeyValue { inherit mkKeyValue listsAsDuplicateKeys; } globalSection)