nixos/doc: document the loaOf type deprecation

This commit is contained in:
rnhmjoj 2020-01-06 18:43:26 +01:00
parent a6d0b81d28
commit fa3919de5f
No known key found for this signature in database
GPG Key ID: BFBAF4C975F76450

View File

@ -357,6 +357,40 @@ services.xserver.displayManager.defaultSession = "xfce+icewm";
<link linkend="opt-services.httpd.virtualHosts">services.httpd.virtualHosts.&lt;name&gt;.useACMEHost</link>.
</para>
</listitem>
<listitem>
<para>
For NixOS configuration options, the <literal>loaOf</literal> type has
been deprecated and will be removed in a future release. In nixpkgs,
options of this type will be changed to <literal>attrsOf</literal>
instead. If you were using one of these in your configuration, you will
see a warning suggesting what changes will be required.
</para>
<para>
For example, <link linkend="opt-users.users">users.users</link> is a
<literal>loaOf</literal> option that is commonly used as follows:
<programlisting>
users.users =
[ { name = "me";
description = "My personal user.";
isNormalUser = true;
}
];
</programlisting>
This should be rewritten by removing the list and using the
value of <literal>name</literal> as the name of the attribute set:
<programlisting>
users.users.me =
{ description = "My personal user.";
isNormalUser = true;
};
</programlisting>
</para>
<para>
For more information on this change have look at these links:
<link xlink:href="https://github.com/NixOS/nixpkgs/issues/1800">issue #1800</link>,
<link xlink:href="https://github.com/NixOS/nixpkgs/pull/63103">PR #63103</link>.
</para>
</listitem>
</itemizedlist>
</section>