75a5a82c

By: Tom Sydney Kerckhove <syd@cs-syd.eu>

Carry a codec's comments into the option it generates

A comment written with <?> or <??> was thrown away when a field became a Nix
option, so only the field's own description survived.  That is the wrong half
to keep for a shared type: a field says what it is for where the field is, and
a type says what it means where the type is, and whoever reads the NixOS module
generated from the codec wants both.  Documentation written on a codec reached
the rendered configuration documentation and silently never reached the module.

Both now, the field's description first and then the comments from outermost
in, joined by newlines.  Through a BimapCodec as the option type already is,
because a codec written for one type in terms of another is still that type's
codec.  Not into an EitherCodec or an ArrayOfCodec, whose comments are about
something the option is made of rather than about the option.

A field with a comment and no description of its own now has a description,
where before it had none at all.
GitHub
configurex86_64-linux