nix-community / dconf2nix

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

Filtering #110

Open yajo opened 1 month ago

yajo commented 1 month ago

The Problem

I want to keep some docnf settings dynamic, so I can change them freely with direct OS usage.

For example, some apps store the last window position. Dumping that into a home-manager configuration makes no sense.

I still want other settings stored into home-manager.

The Solution

I'd love to have some filters in dream2nix that allow me to include only certain paths, or exclude certain others. Some examples:

dconf dump / | dconf2nix --include /org/gnome/clocks --exclude /org/gnome/clocks/state

Alternatives

https://gitlab.com/yajoman/minfra/-/commit/415fd867176cdc9a9353538212567918ff9deb35

Additional context

No response

Happens in the latest version

jtojnar commented 1 month ago

Not sure we want to add more features that are not directly related to conversion. This feels like something an external tool could easily handle. On the other hand, this is something that could be common use case so making it convenient would be good.

Not exactly the same but someone used crudini:

dconf dump / | crudini --del - org/gnome/clocks/state/window

initool works for removal too:

dconf dump / | initool delete - org/gnome/clocks/state/window

Neither of the tools is very ergonomic, though.

jtojnar commented 1 month ago

I will accept pull requests for this but will not implement it myself.