Nix option search from cli?

I’d like to search nixos/flake/etc options from the command line. There is nix search for packages, but I don’t see anything similar for options. I have found a few 3rd party tools for option search, but haven’t tried them out. I usually prefer to learn the core tools before getting into 3rd party stuff.

Q1: is there a way to search nix options using the core nix cli?

Q2: if no, do you have a preference for a 3rd party tool for option search?

I usually do man configuration.nix

2 Likes

I don’t believe there’s a core tool to directly search options. I use the manpage as well, and have nixd configured to show option completions in my editor. I recently also started using nh search option.

1 Like

I don’t believe there’s an appropriate core tool.

This one hasn’t moved in awhile but seems to wrap search.nixos.org (I was wrong, looks like they work from nixpkgs directly. They generate their own json record of all options and search with fzf) and works if you like TUI style:

$ nix run github:ciderale/nix-option-search

1 Like