nix-community / dconf2nix

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

parsing error #87

Closed sjhaleprogrammer closed 3 months ago

sjhaleprogrammer commented 7 months ago

Type of bug

Parsing error

Version

0.1.1

Did you test against master?

Error message (if not timeout)

dconf2nix: "dconf.settings" (line 263, column 34):
unexpected "{"
expecting "<("
CallStack (from HasCallStack):
  error, called at src/DConf2Nix.hs:35:16 in dconf2nix-0.1.1-Kj3okwrvVsmLXSmJ1JaeH6:DConf2Nix

DConf input

[org/gnome/shell]
app-picker-layout=[{'Utilities': <{'position': <0>}>}]

Additional context

No response

montchr commented 4 months ago

I've managed to work around this by deleting that setting from the file using the crudini tool for performing CRUD operations on INI files. I am not sure whether the output format of dconf dump is valid INI, but crudini can handle it just fine.

Example:

dconf dump / > dconf.settings
crudini --del dconf.settings 'org/gnome/shell' 'app-picker-layout'
dconf2nix -i dconf.settings -o dconf.settings.nix
drmikecrowe commented 4 months ago

I used sed:

mike-nixos  main @ 44750a0 ⩮∽+⇡ ❄️ flakeShell-env! dconf dump / | sed '/</d' > dconf.ini