@clv1 @Mudb0y have you used more Nix stuff? If you haven't Nix might not be fully setup.
In that case, how did you install Nix? At least on Debian you might have used the Debian package? Apparently you also need to add your user to the nix-users group, see:
https://sources.debian.org/src/nix/2.35.4%2Bdfsg-1/debian/nix-bin.README.Debian
Maybe you need to do more stuff. If you used the official Nix installer I believe things should work out of the box.