You might be right... I setup the binary cargo installed in the devshell flake not in the configuration.nix where the git package is defined on the nixOS level.
Let me try sth and update you with result. Then if it doesn't help I'll share my nix setup!