summaryrefslogtreecommitdiff
path: root/users/seth/programs/git.nix
blob: e2f7ab05721e99fe4ded88aaa5ffcab6da4ed7cb (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
{
  config,
  lib,
  pkgs,
  inputs,
  ...
}:
let
  cfg = config.seth.programs.git;
in
{
  imports = [ inputs.getchpkgs.homeModules.riff ];

  options.seth.programs.git = {
    enable = lib.mkEnableOption "Git configuration settings" // {
      default = config.seth.enable;
      defaultText = lib.literalExpression "config.seth.enable";
    };
  };

  config = lib.mkIf cfg.enable {
    home.packages = [ pkgs.git-branchless ];

    programs.git = {
      enable = true;

      riff.enable = true;

      extraConfig = {
        init = {
          defaultBranch = "main";
        };
      };

      signing = {
        key = "D31BD0D494BBEE86";
        signByDefault = true;
      };

      userEmail = "[email protected]";
      userName = "Seth Flynn";
    };
  };
}