dotfiles.nix/home/git.nix

25 lines
588 B
Nix

{ config, ... }:
{
# Git
# https://rycee.gitlab.io/home-manager/options.html#opt-programs.git.enable
# Aliases config imported in flake.
programs.git.enable = true;
programs.git.userEmail = config.home.primaryUser.email;
programs.git.userName = config.home.primaryUser.fullName;
programs.git.extraConfig = {
core.editor = "hx";
diff.colorMoved = "default";
pull.rebase = true;
init.defaultBranch = "main";
help.autocorrect = "prompt";
};
programs.git.ignores = [ ".DS_Store" ".direnv" ];
# Enhanced diffs
programs.git.delta.enable = true;
}