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

Trouble with JSON-like entries #37

Closed lbssousa closed 3 years ago

lbssousa commented 3 years ago

I have the following settings for my GNOME extension sound-output-device-chooser

[org/gnome/shell/extensions/sound-output-device-chooser]
hide-on-single-device=true
ports-settings='{"version":2,"ports":[]}'

which dcont2nix converts to this:

"org/gnome/shell/extensions/sound-output-device-chooser" = {
  hide-on-single-device = true;
  ports-settings = "'{"version":2,"ports":[]}'";
};

However, when I try to apply a switch in my Home-Manager config, it returns the following error:

error: undefined variable 'version'
gvolpe commented 3 years ago

Does this work with HM?

{
  "org/gnome/shell/extensions/sound-output-device-chooser" = {
    hide-on-single-device = true;
    ports-settings = ''
      {"version":2,"ports":[]}
    '';
  };
}
lbssousa commented 3 years ago

It seems working in this form. Thanks!

gvolpe commented 3 years ago

Cool it's a bug in dconf2nix then, it should generate that for you. I'll have a look when I have some time.