The wiki lists two ways to enabling flakes on nixos, the second one being a special bash script that does nix --experimental-features "nix-command flakes" "$@"
. Given this, are there any gotchas when enabling the flake
subcommand globally?
The pre-flakes nix
command will stop working, e.g. you can’t use nix run
or nix search
as before anymore. The nix
command will force you to use flakes. However, the old CLI (nix-shell
, nix-env
, nix-store
, etc.) will continue to work just like before.
my nix search
works fine, so not sure what your talking about?
It does not work the same anymore. Now a flake must be specified to search for a package within e.g. nix search nixpkgs#bla
It does not work the same anymore. Now a flake must be specified to
search for a package within e.g.nix search nixpkgs#bla
Just a meaningless & pedantic correction, it’s nix search nixpkgs bla
.
The flake#package
syntax is used to refer to an attribute of a given
flake’s outputs, and isn’t really used in general CLI args
nix-env
will refuse to work on profiles that were modified by nix profile
, but perhaps you did not intend using nix profile
anyway.
Still, if you use home-manager standalone, then you can’t use nix profile
, as HM uses nix-env
under the hood for profile management, which is nix-env actually good at…
ouch! sounds upgrades are need under this ‘hood’.
Yes, there even exists an issue: