/
default.nix
88 lines (74 loc) · 2.04 KB
/
default.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
{ pkgs, ... }:
let lazygit-config =
if pkgs.stdenv.isDarwin
then "Library/Application Support/jesseduffield/lazygit/config.yml"
else ".config/jesseduffield/lazygit/config.yml";
in {
programs.git = {
enable = true;
userName = "Brian Hicks";
userEmail = "brian@brianthicks.com";
aliases = {
aa = "add --all";
amend = "commit --amend";
ci = "commit";
co = "checkout";
dc = "diff --cached";
di = "diff";
publish = "push -u origin HEAD";
st = "status";
yoda = "push --force-with-lease";
root = "rev-parse --show-toplevel";
};
extraConfig = {
init.defaultBranch = "main";
rerere.enabled = true;
"filter \"lfs\"" = {
clean = "${pkgs.git-lfs}/bin/git-lfs clean -- %f";
smudge = "${pkgs.git-lfs}/bin/git-lfs smudge -- %f";
process = "${pkgs.git-lfs}/bin/git-lfs filter-process";
required = true;
};
};
ignores = [ ".DS_Store" ];
delta = {
enable = true;
options = {
syntax-theme = "1337";
plus-color = "#32473d";
minus-color = "#643632";
features = "line-numbers";
whitespace-error-style = "22 reverse";
};
};
};
programs.gh.enable = true;
home.file."${lazygit-config}".text =
builtins.toJSON {
reporting = "off";
startupPopupVersion = 1;
update.method = "never"; # managed through nixpkgs
keybindings = {
universal.return = "q";
universal.createRebaseOptionsMenu = "M";
branches.mergeIntoCurrentBranch = "m";
};
gui.theme = {
lightTheme = false;
activeBorderColor = [ "green" "bold" ];
inactiveBorderColor = [ "white" ];
optionsTextColor = [ "blue" ];
selectedLineBgColor = [ "bold" ];
};
git.paging = {
colorArg = "always";
pager = "${pkgs.gitAndTools.delta}/bin/delta --paging=never";
};
};
home.packages = [
pkgs.git-lfs
pkgs.lazygit
pkgs.gitAndTools.delta
pkgs.git-gclone
];
}