1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-27 05:29:46 +01:00

dconf: Warn about strict typing of options

This is a frequent surprise to users.
This commit is contained in:
Jan Tojnar 2023-05-06 17:26:35 +02:00 committed by Robert Helgesson
parent ea29b1a8d1
commit 0b4ec66640
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89

View file

@ -59,6 +59,17 @@ in {
'';
description = ''
Settings to write to the dconf configuration system.
</para><para>
Note that the database is strongly-typed so you need to use the same types
as described in the GSettings schema. For example, if an option is of type
<literal>uint32</literal> (<literal>u</literal>), you need to wrap the number
using the <literal>lib.hm.gvariant.mkUint32</literal> constructor.
Otherwise, since Nix integers are implicitly coerced to <literal>int32</literal>
(<literal>i</literal>), it would get stored in the database as such, and GSettings
might be confused when loading the setting.
</para><para>
You might want to use <link xlink:href="https://github.com/gvolpe/dconf2nix">dconf2nix</link>
to convert dconf database dumps into compatible Nix expression.
'';
};
};