$ show nix-community/dconf2nix
dconf2nix is a CLI tool and Haskell library that converts GNOME dconf configuration files into Nix expressions for use with Home Manager's dconf.settings option. It parses the GVariant text format using Parsec combinators, supporting a wide range of dconf value types (booleans, integers, floats, strings, byte strings, tuples, lists, variants, dictionaries, typed values, and JSON). The parser is comprehensive and handles edge cases such as hexadecimal and octal integers, scientific notation, Unicode escapes, and nested structures. The rendered output uses Home Manager's lib.hm.gvariant constructor functions to produce valid Nix code. The architecture cleanly separates parsing (DConf module), data model (DConf.Data), and Nix rendering (Nix module), with a small CLI entry point. The codebase is well-tested with 20+ test cases covering various dconf input patterns and their expected Nix output.
The LLM identified 1 files worth highlighting for reuse:
A Parsec-based parser for the GVariant text format used by dconf. It handles all major GVariant value types: booleans, integers (decimal, hex, octal), doubles (including scientific notation), strings (single and double quoted), byte strings, typed values, tuples, lists, variants, dictionaries, and JSON. The module is self-contained with only dependencies on Parsec, Data.Text, and Data.Word. It could be extracted as a standalone library for parsing dconf or GVariant files in any Haskell project.