dotfiles.nix/home/git.nix

33 lines
608 B
Nix

{ flake, ... }:
let inherit (flake.config.users) me';
in {
programs.git = {
enable = true;
userEmail = me'.email;
userName = me'.name;
extraConfig = {
help.autocorrect = "prompt";
init.defaultBranch = "main";
pull.rebase = true;
# recommended by delta
diff.colorMoved = "default";
merge.conflictStyle = "diff3";
};
ignores = [ ".DS_Store" ".direnv" "result" ];
# enhanced diffs
delta = {
enable = true;
options = {
navigate = true;
line-numbers = true;
side-by-side = true;
};
};
};
}