summaryrefslogtreecommitdiff
path: root/config/git/default.nix
blob: f3f223dd94a3fc8e9e28bc256b10a811f64af132 (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
{ pkgs, config, ... }:

{
  programs.git = {
    enable = true;
    userName = "Raghuram Subramani";
    userEmail = "raghus2247@gmail.com";
    extraConfig = {

      init = {
        defaultBranch = "main";
      };

      format = {
        signoff = true;
      };

      url = {

        "git@github.com:" = {
          insteadOf = [
            "github:"
          ];
        };

        "git@github.com:compromyse/" = {
          insteadOf = [
            "compromyse:"
          ];
        };

        "git@git.compromyse.xyz:" = {
          insteadOf = [
            "oxo:"
          ];
        };

      };

      "filter \"lfs\"" = {
         clean = "${pkgs.git-lfs}/bin/git-lfs clean -- %f";
         smudge = "${pkgs.git-lfs}/bin/git-lfs smudge --skip -- %f";
         process = "${pkgs.git-lfs}/bin/git-lfs filter-process --skip";
         required = true;
      };

      push = { autoSetupRemote = true; };

      safe.directory = "*";

    };
  };
}