-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdefault.nix
More file actions
79 lines (79 loc) · 1.98 KB
/
default.nix
File metadata and controls
79 lines (79 loc) · 1.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# https://github.com/git/git
{ pkgs, inputs, ... }:
{
programs.git = {
enable = true;
settings = {
advice = {
addEmptyPathspec = false;
};
alias = {
last = "log -1 HEAD";
list = "log --graph --pretty=format:'%C(yellow)%h%C(reset) %C(dim white)-%C(reset) %s %C(dim white)(%cr)%C(reset) %C(cyan)<%aN>%C(reset)%C(bold)%d%C(reset)' --abbrev-commit --date=relative";
pwd = "!pwd && git branch --show-current";
staged = "diff --staged";
unstage = "restore --staged";
update = "!git fetch origin && git merge origin/main --message 'chore: merge w main'";
whatsnew = "diff HEAD@{1} HEAD";
whoami = "!git config user.name && git config user.email";
};
color = {
ui = "auto";
};
core = {
editor = "nvim";
ignorecase = true;
};
diff = {
tool = "nvimdiff";
};
difftool = {
nvimdiff = {
cmd = "nvim -d $LOCAL $REMOTE";
};
prompt = false;
};
fetch = {
prune = true;
};
filter = {
lfs = {
required = true;
clean = "git-lfs clean -- %f";
process = "git-lfs filter-process";
smudge = "git-lfs smudge -- %f";
};
};
init = {
defaultBranch = "main";
};
mailmap = {
file = "~/.config/git/mailmap";
};
pull = {
rebase = false;
};
push = {
default = "simple";
};
};
ignores = [
".DS_Store"
];
lfs = {
enable = true;
};
signing = {
format = "ssh";
signByDefault = true;
};
};
home.file.".config/git/mailmap" = {
source = ./.mailmap;
};
home.packages = [
inputs.git-coverage.packages.${pkgs.stdenv.hostPlatform.system}.default # https://github.com/zimeg/git-coverage
pkgs.git-open # https://github.com/paulirish/git-open
pkgs.git-who # https://github.com/sinclairtarget/git-who
];
}