This repository has been archived by the owner on Oct 12, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
/
git.nix
66 lines (59 loc) · 1.47 KB
/
git.nix
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
# Git settings
{ config, lib, pkgs, ... }:
let
vscode = pkgs.vscode;
in {
programs.git = {
package = pkgs.gitAndTools.gitFull;
enable = true;
userName = "Luc Perkins";
userEmail = "[email protected]";
# Replaces ~/.gitignore
ignores = [
".cache/"
".DS_Store"
".idea/"
"*.swp"
"built-in-stubs.jar"
"dumb.rdb"
".elixir_ls/"
".vscode/"
"npm-debug.log"
"shell.nix"
];
# Replaces aliases in ~/.gitconfig
aliases = {
ba = "branch -a";
bd = "branch -D";
br = "branch";
cam = "commit -am";
co = "checkout";
cob = "checkout -b";
ci = "commit";
cm = "commit -m";
cp = "commit -p";
d = "diff";
dco = "commit -S --amend";
s = "status";
pr = "pull --rebase";
st = "status";
l = "log --graph --pretty='%Cred%h%Creset - %C(bold blue)<%an>%Creset %s%C(yellow)%d%Creset %Cgreen(%cr)' --abbrev-commit --date=relative";
whoops = "reset --hard";
wipe = "commit -s";
fix = "rebase --exec 'git commit --amend --no-edit -S' -i origin/develop";
};
# Global Git config
extraConfig = {
core = {
editor = "vim";
pager = "delta --dark";
whitespace = "trailing-space,space-before-tab";
};
commit.gpgsign = "true";
gpg.program = "gpg2";
protocol.keybase.allow = "always";
credential.helper = "osxkeychain";
pull.rebase = "false";
};
};
}