about summary refs log tree commit diff
path: root/home/modules/profiles/development/default.nix
blob: e12ee91675556ec3f1accf5172599689467728f1 (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
74
75
76
77
78
{ config, lib, pkgs, ... }:

let
  cfg = config.profiles.development;
in
  {
    options.profiles.development = {
      enable = lib.mkEnableOption
        "A profile that enables the system to be used for developing programs";
      };

      config = lib.mkIf cfg.enable {
        programs.gh.enable = true;
        programs.git = {
          enable = true;
          package = pkgs.gitFull;

          userName = "Zack A";
          userEmail = "hi@boopy.dev";

          signing = {
            key = null;
            signByDefault = true;
          };

          aliases = {
            graph =
              "log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold cyan)%h%C(reset) - %C(green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all";
            co = "checkout";
            br = "branch";
            st = "status";
            ps = "push";
            pl = "pull";
            root = "rev-parse --show-toplevel";
          };

          extraConfig = {
            init.defaultBranch = "main";
            pull.rebase = true;
          };

          ignores = [
            # IntelliJ files and folders
            ".idea/"
            "*.iml"
            # backupfiles and shadow copies done by editors
            "*~"
            "\\#*\\#"
            ".#*"
            # Elixir language server
            "/.elixir_ls"
            # MyPy Cache
            ".mypy_cache"
            # Visual Studio Code project configuration
            "/.vscode"
            # Result folder for nix builds
            "result"
            "result-*"
            # direnv caches
            ".direnv/"
            # emacs/python stuff
            "flycheck_*.py"
          ];
        };

        home.packages = [ pkgs.ripgrep pkgs.rust-analyzer pkgs.gnupg pkgs.tig ];

        services.gpg-agent = {
          enable = true;
          enableExtraSocket = true;
          defaultCacheTtl = 34560000;
          defaultCacheTtlSsh = 34560000;
          maxCacheTtl = 34560000;
          maxCacheTtlSsh = 34560000;
        };
      };
  }