nix-config/home/essentials/git.nix
2025-12-02 21:27:05 +01:00

37 lines
739 B
Nix

{ lib, pkgs, ... }:
{
programs.git = {
enable = true;
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;
};
}