···11+<section xmlns="http://docbook.org/ns/docbook"
22+ xmlns:xlink="http://www.w3.org/1999/xlink"
33+ xmlns:xi="http://www.w3.org/2001/XInclude"
44+ version="5.0"
55+ xml:id="sec-meta-attributes">
66+77+<title>Meta-attributes</title>
88+99+<para>Like Nix packages, NixOS modules can declare meta-attributes to provide
1010+ extra information. Module meta-attributes are defined in the
1111+ <filename
1212+ xlink:href="https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/misc/meta.nix">meta.nix</filename>
1313+ special module.</para>
1414+1515+<para><literal>meta</literal> is a top level attribute like
1616+ <literal>options</literal> and <literal>config</literal>. Available
1717+ meta-attributes are <literal>maintainers</literal> and
1818+ <literal>doc</literal>.</para>
1919+2020+<para>Each of the meta-attributes must be defined at most once per module
2121+ file.</para>
2222+2323+<programlisting>
2424+{ config, lib, pkgs, ... }:
2525+{
2626+ options = {
2727+ ...
2828+ };
2929+3030+ config = {
3131+ ...
3232+ };
3333+3434+ meta = {
3535+ maintainers = with lib.maintainers; [ ericsagnes ]; <co
3636+ xml:id='modules-meta-1' />
3737+ doc = ./default.xml; <co xml:id='modules-meta-2' />
3838+ };
3939+}
4040+</programlisting>
4141+4242+<calloutlist>
4343+ <callout arearefs='modules-meta-1'>
4444+ <para>
4545+ <varname>maintainers</varname> contains a list of the module maintainers.
4646+ </para>
4747+ </callout>
4848+4949+ <callout arearefs='modules-meta-2'>
5050+ <para>
5151+ <varname>doc</varname> point to a valid docbook file containing the module
5252+ documentation, its contents are automatically added to the <xref
5353+ linkend="ch-configuration"/>.
5454+ Changes to a module documentation must be checked to be non-breaking by
5555+ building the NixOS manual.
5656+ </para>
5757+ <programlisting>$ nix-build nixos/release.nix -A manual</programlisting>
5858+ </callout>
5959+6060+</calloutlist>
6161+6262+</section>