1) the inferior solution seems easier at first (but won't be in the long run)
2) the people blithely picking the inferior solution have not yet encountered enough of the thorny nastiness that the initially-harder option completely prevents
the end result being that all the "greybeards" have settled on the "initially harder" solutions for things because they all learned the hard way that it just causes less headaches in the long run
For example, how would I `lx add <dependency@version>` if the `dependencies` table might be generated by a Lua function?
A flake.nix is certainly not packaging metadata, but I do know those input section restrictions do cause occasional confusion with users who think "ah, Nix code" and only realise afterward that it's really json in Nix syntax."
All that to say, if a thing is not evaluate-able, it's probably best to represent it in a different enough form that no one could mistake it for a thing that can be evaluated.
Not too hard. Emacs does it with the .emacs file, mixing generated and manual content.
If it comes from an impure function, you don't know if you'll get the same result each time you evaluate it.
> Modify. Serialize to file.
And potentially lose information.