Mixing Nix and non-Nix packages

I’ve been using Nix for a few years in various ways.

Recently I installed nix alongside my existing ArchLinux package manager so I could use home-manager. I end up with a bunch of binaries in ~/.nix-profile/bin shadowing a ton of system packages, including development tools like gcc and ld. This caused some really messed up challenges to debug when I was compiling things from source, since system tools were mixed with nix tools of varying versions.

Is there a reason Nix adds a profile with so many low level binaries even though I don’t explicitly install them? Is there a way to “disable” nix temporarily? I have been switching nix “off” by renaming ~/.nix-profile temporarily which works fine.

It seems like running Nix alongside regular package manager is a recipe for some very painful situations. But it’s a common recommendation for newcomers. Are there any guidelines for this situation of having a mix of system and nix packages like ld/gcc?

I would suggest using nix-shell command / a shell.nix file for that.