From bda284daa908f069f9d277d2cd1c04bd1fd0400c Mon Sep 17 00:00:00 2001 From: etwas Date: Tue, 2 Dec 2025 21:27:05 +0100 Subject: [PATCH] feat: improve git config --- home/essentials/git.nix | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) 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; + }; }