I’ve converted to NixOS! It’s very cool, and I like it a lot.
My main gripe is that looking up derivations or NixOS configuration options seems to very much depend on
using https://search.nixos.org. The website is fine, but I don’t like that there’s no real alternative you can use
directly from your terminal, short of manually grepping through your copy of nixpkgs
.
All the raw data is here, so it was only a matter of writing wrappers around it. They’re in my nix-tools repository.
$ git clone https://git.sixfoisneuf.fr/nix-tools
$ cd nix-tools/
$ go build ./cmd/nix-search
$ go build ./cmd/nixos-search
nix-search
works by parsing the output ofnix-env -qa --json --meta
to search through all available packages.nixos-search
works by using thenixosOptionsDoc.optionJSON
derivation, which generates a JSON file with all the NixOS options
Most importantly, neither of the two tools require an Internet connection to work, either during normal usage or during indexing.