nix-config/home/git.nix
Donovan Glover 2297fb41e3
treewide: Drop usage of inherit (pkgs)
Having to change the package list in two places was a bit redundant. We
can also use `with` patterns now since nixd warns if there are escaping
variables being used.

Note that variables used in multiple places are kept to make it easier
to recognize that those variables must be changed together. Also note
that inherit (pkgs) inside of mkMerge are currently kept to reduce the
diff.
2024-08-07 16:40:58 -04:00

73 lines
1.4 KiB
Nix

{ pkgs, ... }:
{
home.packages = with pkgs; [
tig
mgitstatus
];
xdg.configFile."tig/config".text = ''
color cursor black green bold
color title-focus black blue bold
color title-blur black blue bold
'';
programs.git = {
enable = true;
aliases = {
contrib = "shortlog -n -s";
remotes = "remote -v";
praise = "blame";
verify = "log --show-signature";
};
attributes = [ "*.lockb binary diff=lockb" ];
extraConfig = {
include.path = "~/.gituser";
commit.gpgsign = true;
diff.lockb = {
textconv = "bun";
binary = true;
};
core = {
editor = "nvim";
autocrlf = false;
quotePath = false;
};
push.default = "simple";
pull.rebase = true;
branch.autosetuprebase = "always";
init.defaultBranch = "master";
rerere.enabled = true;
color.ui = true;
blame = {
date = "relative";
};
"color \"diff-highlight\"" = {
oldNormal = "red bold";
oldHighlight = "red bold";
newNormal = "green bold";
newHighlight = "green bold ul";
};
"color \"diff\"" = {
meta = "yellow";
frag = "magenta bold";
commit = "yellow bold";
old = "red bold";
new = "green bold";
whitespace = "red reverse";
};
};
diff-so-fancy.enable = true;
};
}