aboutsummaryrefslogtreecommitdiffstats
path: root/modules/hm/sils/git.nix
blob: 5bd4dd2eae7aa84ba36c97891cb618ea151e8553 (plain) (blame)
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
{
  config,
  lib,
  pkgs,
  ...
}: let
  cfg = config.sils.git;
in {
  options.sils.git.enable = lib.mkEnableOption "sils git config";
  config = lib.mkIf cfg.enable {
    programs.git = {
      enable = true;
      package = pkgs.gitFull;
      userName = "Silas Schöffel";
      userEmail = "sils@sils.li";
      delta = {
        enable = true;
        options = {
          decorations = {
            commit-decoration-style = "bold purple box ul";
            file-decoration-style = "none";
            file-style = "bold red ul";
          };
          features = "decorations";
          whitespace-error-style = "22 reverse";
        };
      };
      signing = {
        key = "467B7D129EA73AC9";
        signByDefault = true;
      };
      extraConfig = {
        core = {
          autocrlf = "input";
        };
        safe = {
          directory = "/etc/nixos";
        };
        push = {
          autoSetupRemote = true;
        };
        init = {
          defaultBranch = "main";
        };
        commit = {
          verbose = true;
        };
        sendemail = {
          smtpserver = "server1.vhack.eu";
          smtpuser = "sils@sils.li";
          smtpencryption = "ssl";
          smtpserverport = "465";
        };
      };
      aliases = {
        recommit = "commit --file=.git/COMMIT_EDITMSG --edit";
      };
    };
  };
}