I installed with the recommended shell command:
$ sh <(curl -L https://nixos.org/nix/install)
Then, in a new window:
nix-shell -p nix-info --run "nix-info -m"
No errors.
When I try something like nix search mtr
I get:
error: experimental Nix feature 'flakes' is disabled; add '--extra-experimental-features nix-command' to enable it
I added that to vi /private/etc/nix/nix.conf
Then nix search mtr
yields
error: experimental Nix feature 'flakes' is disabled; add '--extra-experimental-features flakes' to enable it
before I go too far down the rabbit hole, any suggestions?
Welcome to the Nix rabbit hole and the community!
As of now, Flakes and the nix
command (along with its subcommand nix search
) are still experimental features. The nix
command was introduced with version 2.0. See the Release Notes in the Nix Reference Manual: it is “intended to eventually replace all nix-*
commands with a more consistent and better designed user interface.”
“nix search
replaces nix-env -qa
. It searches the available packages for occurrences of a search string in the attribute name, package name or description. Unlike nix-env -qa
, it has a cache to speed up subsequent searches.”
You can enable both Flakes and the nix
command by adding the following line to your nix.conf file:
experimental-features = nix-command flakes
Then you’re ready to go.