aboutsummaryrefslogtreecommitdiff
path: root/programs/git.nix
blob: d4fac67a860117bcfff4980ff7363438cf9703b7 (plain)
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
{ config
, pkgs
, theme
, ...
}:

with theme;
{
  programs.git = {
    enable = true;
    ignores = [ ".envrc" ];
    userEmail = "[email protected]";
    userName = "Akshay";
    lfs.enable = true;
    delta = {
      enable = true;
      options = {
        features = "decorations labels";
        syntax-theme = "none";
        zero-style = "8";
        navigate = "true";
        line-numbers = "true";
        keep-plus-minus-markers = "true";
        line-numbers-zero-style = "8";
        line-numbers-left-style = "8";
        line-numbers-right-style = "8";
        line-numbers-minus-style = "${base08}";
        line-numbers-plus-style = "${base0B}";
        decorations = {
          file-decoration-style = "none";
          whitespace-error-style = "22 reverse";
          minus-style = "${base08}";
          minus-emph-style = "${base08} bold";
          plus-style = "${base0B}";
          plus-emph-style = "${base0B} bold";
          file-style = "7 bold";
          hunk-header-style = "7";
          hunk-header-decoration-style = "8 ul";
        };
        labels = {
          file-modified-label = " MODIFIED ";
          file-removed-label = " REMOVED ";
          file-added-label = " ADDED ";
          file-renamed-label = " RENAMED ";
        };
      };
    };
    aliases = {
      co = "checkout";
      rb = "rebase";
    };
    extraConfig = {
      commit.verbose = true;
      core = {
        hooksPath = "/home/np/.hooks";
      };
      column = {
        ui = "auto dense";
        status = "never";
      };
      branch.sort = "-committerdate";
      worktree.guessRemote = true;
      rebase = {
        abbreviateCommands = true;
        stat = true;
      };
      rerere = {
        enabled = true;
        autoUpdate = true;
      };
      merge.conflictstyle = "diff3";
    };
  };
}