Title is my question. What is the best way to search for nix packages from the command line? Asking from both a NixOS and a nix-darwin standpoint.
Right now what I do is head to search.nixos.org to search for packages, but that’s not ideal since I have to leave my terminal. I have tried nix search nixpkgs somePackage but that takes many minutes (last test I had run was nix search nixpkgs neofetch on my nix-darwin machine and that took 3:45).
It takes around 10 seconds on my machine, but it is so because i pinned the nixpkgs entry in the flake registry to the one currently in use.
$ time nix search nixpkgs neofetch
* legacyPackages.x86_64-linux.freshfetch (0.2.0)
A fresh take on neofetch
* legacyPackages.x86_64-linux.neofetch (2020-11-26)
A fast, highly customizable system info script
real 0m10,138s
user 0m7,766s
sys 0m1,011s
By default it points to the bare nixpkgs repo (master branch) and so nix downloads a new version of it most of the times.
I hate to hijack my own thread: is there a way to search options for configuration from your system as well? That’s another thing I have to head to the internet for, and that’s even worse since sometimes I can head to NixOS Search - Loading..., but other times I have to go to Appendix A. Configuration Options for home-manager stuff