nix-community / dconf2nix

:feet: Convert dconf files (e.g. GNOME Shell) to Nix, as expected by Home Manager [maintainer=@jtojnar]
Apache License 2.0
228 stars 6 forks source link

Using `mk` functions #43

Closed rycee closed 3 years ago

rycee commented 3 years ago

I noticed in https://github.com/nix-community/home-manager/issues/2249 that dconf2nix generates output in a "raw" dconf format, for example, the uint32 value 0 is emitted as a Nix string "uint32 0". This is not really the intended way to construct GVariant values in the HM library. The recommended way to emit values is to use the various mk functions as described in the manual (scroll down to where hm.types.gvariant starts).

For example, instead of having "uint32 0" one would use lib.hm.gvariant.mkUint32 0. Using the functions should be considerably more robust.

Btw, very neat project! Good job 🙂

rycee commented 3 years ago

Btw, you can see the functions in action in the gvariant test case.

gvolpe commented 3 years ago

Thanks a lot @rycee ! Didn't know about those mk functions, will get it done soon :)

parthy commented 3 years ago

Thanks to both of you for taking care of this! It works perfectly now.