nix: nixify gitconfig

This commit is contained in:
Dave Gallant
2021-01-09 22:12:08 -05:00
parent e6949a6b46
commit d3ad84e335
2 changed files with 149 additions and 159 deletions

View File

@@ -37,6 +37,62 @@
'';
};
git = {
enable = true;
aliases = {
"aa" = "add -A .";
"br" = "branch";
"ca" = "commit -S --amend";
"cb" = "checkout -b";
"ci" = "commit";
"cm" = "commit -m";
"co" = "checkout";
"cs" = "commit -S";
"csm" = "commit -S -m";
"csa" = "commit -S --amend";
"deleted" = "log --diff-filter=D --summary";
"di" = "diff";
"dic" = "diff --cached";
"dicn" = "diff --cached --name-only";
"din" = "diff --name-only";
"l" = "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit";
"ms" = "merge --squash";
"pb" = "pull --rebase";
"po" = "push origin";
"por" = "push origin HEAD:refs/for/$1";
"st" = "status";
"wip" = "for-each-ref --sort='authordate:iso8601' --format=' %(color:green)%(authordate:relative)%09%(color:white)%(refname:short)' refs/heads";
};
includes = [
{ path = "~/.gitconfig-work"; }
];
delta = {
enable = true;
options = {
features = "line-numbers decorations";
whitespace-error-style = "22 reverse";
plus-style = "green bold ul '#198214'";
decorations = {
commit-decoration-style = "bold yellow box ul";
file-style = "bold yellow ul";
file-decoration-style = "none";
};
};
};
extraConfig = ''
[push]
default = current
[pull]
rebase = true
'';
};
zsh = {
enable = true;
enableAutosuggestions = true;

View File

@@ -1,66 +0,0 @@
[include]
path = ~/.gitconfig-work
[alias]
aa = add -A .
br = branch
ca = commit -S --amend
cb = checkout -b
ci = commit
cm = commit -m
co = checkout
cs = commit -S
csm = commit -S -m
csa = commit -S --amend
deleted = log --diff-filter=D --summary
di = diff
dic = diff --cached
dicn = diff --cached --name-only
din = diff --name-only
l = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
ms = merge --squash
pb = pull --rebase
po = push origin
por = push origin HEAD:refs/for/$1
st = status
wip = for-each-ref --sort='authordate:iso8601' --format=' %(color:green)%(authordate:relative)%09%(color:white)%(refname:short)' refs/heads
[color]
diff = auto
status = auto
branch = auto
[core]
editor = vim
pager = delta
[push]
default = current
[pull]
rebase = true
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
required = true
process = git-lfs filter-process
[commit]
gpgsign = true
[gpg]
program = gpg
[interactive]
diffFilter = delta --color-only
[delta]
features = line-numbers decorations
whitespace-error-style = 22 reverse
plus-style = green bold ul "#198214"
[delta "decorations"]
commit-decoration-style = bold yellow box ul
file-style = bold yellow ul
file-decoration-style = none