diff --git a/home/essentials/git.nix b/home/essentials/git.nix index f39f9a2..47c57be 100644 --- a/home/essentials/git.nix +++ b/home/essentials/git.nix @@ -1,12 +1,37 @@ +{ lib, pkgs, ... }: { programs.git = { enable = true; - extraConfig = { + settings = { push.autoSetupRemote = true; init.defaultBranch = "main"; pull.rebase = true; + + credential = { + "https://github.com/" = { + helper = "${lib.getExe pkgs.gh} auth git-credential"; + }; + "https://gist.github.com/" = { + helper = "${lib.getExe pkgs.gh} auth git-credential"; + }; + }; + + url = { + "ssh://git@github.com" = { + insteadOf = "https://github.com"; + }; + "ssh://git@git.catgirl.dog" = { + insteadOf = "https://git.catgirl.dog"; + }; + }; }; }; + + programs.lazygit = { + enable = true; + + enableZshIntegration = true; + }; }