nix-config/home/git.nix

75 lines
1.4 KiB
Nix
Raw Normal View History

{ pkgs, ... }:
2023-06-11 15:51:26 +02:00
let
2024-04-06 04:51:24 +02:00
inherit (pkgs) tig mgitstatus;
in
2023-06-22 16:42:23 +02:00
{
2024-04-06 04:51:24 +02:00
home.packages = [ 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;
2024-04-17 02:04:24 +02:00
aliases = {
contrib = "shortlog -n -s";
remotes = "remote -v";
praise = "blame";
verify = "log --show-signature";
};
2024-04-11 18:05:15 +02:00
attributes = [
"*.lockb binary diff=lockb"
];
extraConfig = {
include.path = "~/.gituser";
commit.gpgsign = true;
2024-04-11 18:05:15 +02:00
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;
2024-04-05 01:42:03 +02:00
blame = {
date = "relative";
};
"color \"diff-highlight\"" = {
oldNormal = "red bold";
2023-06-28 15:14:03 +02:00
oldHighlight = "red bold";
newNormal = "green bold";
2023-06-28 14:57:41 +02:00
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;
};
}