Auf YouTube findest du die angesagtesten Videos und Tracks. Außerdem kannst du eigene Inhalte hochladen und mit Freunden oder gleich der ganzen Welt teilen.
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 , dig you’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:
The Nix store path format is /nix/store/<hash>-<pname>-<version>-<output> so that is the dnsutils output of bind, which is bind.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, or bind.dnsutils. (They all end up pointing to that binary in bind.dnsutils.)
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.)