this post was submitted on 12 Mar 2026
9 points (90.9% liked)
Nix / NixOS
2737 readers
2 users here now
Main links
Videos
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
I really appreciate the comma command.
The comma command is magic! Of course I use it often to run something that I don't feel like I need listed in my main config - especially a command that I just want to run once. But there are also plenty of cases where I do want to add a package to a config, and I know the command that I want, but I don't know which package it comes from. The comma is a real easy way to find out.
I haven't watched the video - maybe these tips are already in there. If you run a command like
, digyou'll often be prompted to choose which package to get the command from, if the same command is provided by multiple packages. So that's one way to get a package name. If you don't get that prompt you can use comma as a lookup tool like this:Or you can ask comma to show you the path of the executable it would run, and infer the package name from the path:
The Nix store path format is
/nix/store/<hash>-<pname>-<version>-<output>so that is thednsutilsoutput ofbind, which isbind.dnsutils.So that gives me package names I can put in my NixOS config, or devshell, or whatever. In this case I could install any of
dig,bind,dig.dnsutils, orbind.dnsutils. (They all end up pointing to that binary inbind.dnsutils.)