Hacker News new | ask | show | jobs
by __MatrixMan__ 883 days ago
Is there a good way of getting this sort of thing for nix projects in general? I often find myself cloning the repo for it just so I can grep for `mkOption` and I often wonder if there's a smarter way.
4 comments

I only got it to the proof of concept stage, but I was hacking on something that would generate docs for everything found on a Nix Flake (including modules): https://github.com/snowfallorg/frost

Here's an example output that I generated for my config repo: https://jakehamilton.github.io/config/

Don't projects using Nix modules typically list all the available options in their documentation? For example,

https://nix-community.github.io/home-manager/options.xhtml

I find it good practice to actually read the modules though. So personally, I think grepping is fine.

Some services have a very heavy meta description. I can't think of one for home-manager right now, but in nixos caddy config is not easy to read from source.
man configuration.nix

Then use the search function of the pager.

man home-configuration.nix

works for home-manager