aboutsummaryrefslogtreecommitdiff
path: root/programs/git.nix
blob: e4b5e0fe0d72c7251423eef2285c6981f897994d (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
{ 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";
        keep-plus-minus-markers = "true";
        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 italic";
          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 ";
        };
      };
    };
    # difftastic = {
    #   enable = true;
    #   background = "dark";
    #   display = "inline";
    # };
    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;
      };
    };
  };
}