Prefer locally installed /usr/bin/git

From what I understand, gLinux and Nix are sometimes compatible and sometimes
incompatible.

Some nix-installed programs rely on system state that differs from gLinux's
system state. In other cases, Google wraps existing programs (e.g. git) to
provide Google-specific configuration.

Ever since I switched to home-manager and set `programs.git.enable = true`,
magit, which uses the git that PATH exposes hasn't been able to push, fetch, and
a few other commands.

TODO(wpcarro): Define a base home.nix that my gLinux and NixOS machines can
extend.
This commit is contained in:
William Carroll 2020-03-13 16:54:51 +00:00
parent bd67b07f52
commit beeed2baa2

View file

@ -41,6 +41,9 @@
programs.git = { programs.git = {
enable = true; enable = true;
package = pkgs.writeShellScriptBin "git" ''
exec /usr/bin/git "$@"
'';
userName = "William Carroll"; userName = "William Carroll";
userEmail = "wpcarro@gmail.com"; userEmail = "wpcarro@gmail.com";
aliases = { aliases = {