summaryrefslogtreecommitdiff
path: root/profiles/core/git.nix
blob: 44cadf7bc7627cf0b9402784249f56826ae9ec5d (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
{config,lib, ...}: with lib;
{
  hm = {
    programs.git = {
      enable = true;
      userName = my.realName;
      userEmail = if config.networking.hostName == "work" then "mike@pionative.com" else my.email;
      extraConfig = {
        worktree.guessRemote = true;
        mergetool.fugitive.cmd = "vim -f -c \"Gdiff\" \"$MERGED\"";
        merge.tool = "fugitive";
        gpg.format = "ssh";
        user.signingKey = "${config.my.home}/.ssh/id_ed25519_sk.pub";
        commit.gpgsign = true;
      };

      ignores = [
        "/.direnv/"
        "/.envrc"
        "/.env"
        ".vimsession.vim"
        "tfplan"
        "plan"
      ];
    };
  };
}