Glad youre excited!
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
So, this just outputs a derivation. So, by default you can use it anywhere. Just install it wherever it asks for packages. As far as intermediate options, or being able to toggle things, you can ALWAYS call .wrap on it and get a new package! You could simply define an option, and then you can .wrap { theopt = true; } when you want it.
As far as outputting extra items, you can add things to passthru, which get upvalued, its basically just like putting stuff into the set you return, except the set is also a package.
In my tmux config, I output a nixos module via passthru for setting utempter on nixos machines
You get the WHOLE module system PER package. So, anything you can do in a module, and to a module option, you can do to this. lib.mkDefault, etcâŚ
Also, everything assigned in config is technically accessible from outside via any evaluation of the module, through the .config attribute, which is also accessible via passthru.configuration or just .configuration on the final package.
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.
I donât specify if anything has to be in the store other than the input package that you plan to wrap. If you want to use a runtime location in the flags or variables set in your wrapper, that works just fine.
You could define a toggle option in your own config of the module, which if you toggle it swaps between 2 different locations of your choosing, one could be in the store, the other just a regular path.
As far as exporting the config file or directory as a package, that would be down to individual wrapper modules deciding to export that or not, but they can!