I like this! I think this is the first project I see that matches the closest to what I’ve been envisioning & incrementally doing in my own dotfiles these past few years
I like how you did the flags, I don’t have a good thing for that in my impl yet. I only have an incomplete draft for setting flags and declaratively doing env var overrides…
My impl has a few additional nice features that you might be interested in:
-
(basic vision) Most of my programs are not configured through Nix, but Nix is used to package the config and make it available in different ways with its dependencies.
-
Packaged configs can seemlessly be either with editable or fully-packaged config files (by only flipping a switch) to avoid having to rebuild the package after each change in a non-Nix config file when I don’t want to.
-
Multiple outputs, so a given config can be used standalone or integrated in a home-manager setup (with editable files) but also to be able to export generated config dirs or other intermediate derivations
-
Referenced packages and additional dependencies of a given config can be overridden individually (e.g. from outside of its first evaluation).
-
Each config has an ID (must be defined, can be overriden of course) to identify state, to allow multiple installed varients of an (e.g. editable) config in a home-manager setup.
-
My own way to re-wrap N times (that I just call ‘extend’) can access the ‘previous’ config, to extend (not just replace) any config options.
My dotfiles only have defined a few config module based on this system for zsh, tmux & neovim, but I’m planning to do a lot more like git, mpv, karabiner-element… Someday…
I’ll probably take some of your ideas though, looks like you had a few more iterations than me on the option names! (and since you’re based on the existing wrappers projects)
I’m not sure how compatible my vision is to yours, but maybe we can collaborate
Few links if you want to take a look:
- My ‘kit’ system
- My ‘kits’
- My (partially standalone) neovim config definition and its base module