Generating documentation for NixOS module in flake

I’m working on a NixOS module, in a flake with a nixosModules.default output. I’m including descriptions for all the options, etc.

Is there a way to generate some kind of documentation from this flake output, that will show the options with their descriptions?

1 Like
1 Like

As @wamserma mentioned, Frost tries to do this but is still very much in a proof-of-concept state. I am hoping to get around to working on it again soon. In working on the project I found that generating this documentation was more difficult than it needed to be. There are facilities in NixPkgs to generate docs, but it is very NixPkgs-specific and you’re required to add additional logic in order to produce docs for custom modules. The implementation in Frost comes from Home-Manager’s solution.

1 Like