Any downsides for enabling flakes?

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.

2 Likes

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

1 Like

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 :slight_smile:

1 Like

nix-env will refuse to work on profiles that were modified by nix profile, but perhaps you did not intend using nix profile anyway.

2 Likes

nix-env!..

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…

1 Like

ouch! sounds upgrades are need under this ‘hood’.

Yes, there even exists an issue:

https://github.com/nix-community/home-manager/issues/2352

1 Like