mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 23:03:40 +01:00
nixos/doc: document the loaOf type deprecation
This commit is contained in:
parent
a6d0b81d28
commit
fa3919de5f
1 changed files with 34 additions and 0 deletions
|
@ -357,6 +357,40 @@ services.xserver.displayManager.defaultSession = "xfce+icewm";
|
|||
<link linkend="opt-services.httpd.virtualHosts">services.httpd.virtualHosts.<name>.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>
|
||||
|
||||
|
|
Loading…
Reference in a new issue