dconf: Warn about strict typing of options
This is a frequent surprise to users.
This commit is contained in:
parent
ea29b1a8d1
commit
0b4ec66640
|
@ -59,6 +59,17 @@ in {
|
||||||
'';
|
'';
|
||||||
description = ''
|
description = ''
|
||||||
Settings to write to the dconf configuration system.
|
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.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue