Should I force all package derivation to flake way? y,.y "Too many open files"

% nix
error: no subcommand specified
Try ‘nix --help’ for more information.

% nix search hello
error: experimental Nix feature ’ nix-command ’ is disabled; use '–extra-experimental-features nix-command ’ to override

% nix-env -i java-hello

installing ‘java-hello-1.0’
these 247 derivations will be built:

error: opening directory ‘/nix/store/4la0z6j0ks5hxpjqi1ngpdy29dmq8pbn-surefire-api-2.12.4.pom’: Too many open files

The last error occurs unconditionally when there is a lot of installation. Even if I set the macos max file configuration on the internet, it didn’t solve it, so I reinstalled nix, but the same.

1,2 solution

edit /etc/nix/nix.conf
experimental-features = nix-command flakes

I split the package and processed it,
In my personal project like java-hello, the build fails. Use mvn2nix. Perhaps the mvn2nix developers or several other developers will have to look after them.