about summary refs log tree commit diff
path: root/configs/.config/nixpkgs/home.nix
blob: d9b3cae931a83b2b9cabb79d9998ccd9ff489099 (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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
{ config, pkgs, ... }:

{
  home = {
    packages = with pkgs; [
      bat
      exa
      ripgrep
      fd
      pass
      tokei
      nmap
      tldr
      diskus
      jq
      pup
    ];
    sessionVariables = {
    };
    stateVersion = "19.09";
  };

  ##############################################################################
  # Programs
  ##############################################################################

  programs.home-manager = {
    enable = true;
    path = builtins.toPath ~/home-manager;
  };

  programs.git = {
    enable = true;
    userName = "William Carroll";
    userEmail = "wpcarro@gmail.com";
    aliases = {
      today = "! git log --date=relative --since=00:00:00 --all --no-merges --oneline --author=\"$(git config --get user.email)\"";
      yday = "! git log --since=yesterday.midnight --until=today.midnight --oneline --author=\"$(git config --get user.email)\"";
      changed-files = "! git --no-pager diff --name-only $(current_branch) $(git merge-base $(current_branch) master)";
      conflicts = "! git --no-pager diff --name-only --diff-filter=U";
      unstage = "reset HEAD --";
    };
    extraConfig = {
      push.default = "current";
      rebase = {
        autosquash = true;
        autostash = true;
      };
      rerere.enabled = true;
    };
  };

  programs.gpg = {
    enable = true;
    settings = {
      keyserver = "hkp://pgp.mit.edu";
    };
  };

  programs.ssh = {
    enable = true;
    matchBlocks = {
      desktop = {
        user = "wpcarro";
        hostname = "zeno.lon.corp.google.com";
      };
      socrates = {
        user = "wpcarro";
        hostname = "84.92.33.141";
      };
    };
  };

  programs.fzf = rec {
    defaultCommand = "fd --hidden --follow --exclude '.git'";
    fileWidgetCommand = defaultCommand;
  };

  ##############################################################################
  # Services
  ##############################################################################

  services.lorri.enable = true;

  services.gpg-agent = {
    enable = true;
    defaultCacheTtl = 7200;
    maxCacheTtl = 7200;
  };
}