Can I just do “nix install foo”? I looked into nix ages ago but opening a text file any time I wanted to install some random package just felt too weird.
# search for a package called `foo`
nix search nixpkgs foo
# install package foo, user-wide
nix-env -i foo
The CLI UX can get better, and I'm fairly sure folks are working on it.You can also test-drive a package without committing to it, e.g. you want to try the program `cowsay` but only want to use it once:
nix-shell -p cowsay
cowsay
exit
This spawns a new shell with `cowsay` available, and after you exit it won't be cluttering your system packages.