diff --git a/docs/writing-modules.adoc b/docs/writing-modules.adoc index b502c17c8..482bc7702 100644 --- a/docs/writing-modules.adoc +++ b/docs/writing-modules.adoc @@ -80,7 +80,7 @@ would place `c` before `b` and after `a` in the graph. [[sec-option-types-gvariant]]`hm.types.gvariant`:: This type is useful for options representing {gvariant-description}[GVariant] values. The type accepts all primitive GVariant types as well as arrays, tuples, ``maybe'' types, and dictionaries. + -To create a GVariant value you can use a number of provided functions. Examples assume an option `foo.bar` of type `hm.types.gvariant`. +Some Nix values are automatically coerced to matching GVariant value but the GVariant model is richer so you may need to use one of the provided constructor functions. Examples assume an option `foo.bar` of type `hm.types.gvariant`. + [[sec-option-types-gvariant-mkBoolean]]`hm.gvariant.mkBoolean (v: bool)`::: Takes a Nix value `v` to a GVariant `boolean` value. Note, Nix booleans are automatically coerced using this function. That is,