nix-instantiate --find-file nixpkgs
To know the commit, open the .version-suffix file in the nixpkgs location. The hash after the dot is the git commit.