Setting out to think about a tool that generates documentation from nix modules, the first thing that we (@a-kenji, @vimal and I) figured out is that whatever values are provided by nix module is determined by evaluation of it. There are no static items. Everything is an expression.
The only non-hacky way (of obtaining documentation from nix code) I can think of, is by evaluating the code. Otherwise, we are resorting to various “well, if the AST is exactly this or that way” and such. And I don’t find that appealing.
Or, should we have static items in the language to solve this problem?