3 ms·
> I’ve since given up using search.nixos.org and now just grep the nixpkgs repository. I still use search.nixos.org as well, but this is the single biggest ste
by pxc 4y ago
> I’ve since given up using search.nixos.org and now just grep the nixpkgs repository.
I still use search.nixos.org as well, but this is the single biggest step anyone can take to massively level up with Nix. Nixpkgs is an incredibly valuable collection of examples, both of how to use Nix and of how to configure the upstream services that NixOS supports.
It might sound ugly, or overinvolved, or intimidating, but once you add the Nixpkgs codebase to your list of reference documents, many things become way faster and easier.
- rgoulter 4y agoIn case anyone overlooks it, search.nixos.org also will link to the nix code in nixpkgs for a package. With flakes, IIRC, `nix edit nixpkgs#<pkg>` will also open up the source. https://nixos.org/manual/nix/stable/command-ref/new-cli/nix3-edit.html https://nixos.org/manual/nix/stable/command-ref/new-cli/nix3...
- pxc 4y agoGreat point! If you know what package you want to examine, these are both super handy. Just because you want to peek at a package's build's source does not mean you have to go grepping blind through the repo. Better to be pointed directly to the right file by one of these tools! I use the source link on the NixOS Package Search site on mobile all the time, when I want to refer myself or others to examples but I'm afk.