about summary refs log tree commit diff
path: root/users/wpcarro/common.nix
blob: 4e960bee4ec50d060fbb0c8176be43db850c4542 (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
{ depot, pkgs, ... }:

let
  inherit (depot.users) wpcarro;
in
{
  programs = {
    fish.enable = true;

    gnupg.agent.enable = true;

    ssh = {
      startAgent = true;
      extraConfig = ''
        AddKeysToAgent yes
      '';
    };

    git = {
      enable = true;
      config = {
        user.name = "William Carroll";
        user.email = "wpcarro@gmail.com";
      };
    };
  };

  services = {
    # Remodel the system clipboard as a list instead of a point.
    clipmenu.enable = true;

    locate.enable = true;

    depot.automatic-gc = {
      enable = true;
      interval = "1 hour";
      diskThreshold = 16; # GiB
      maxFreed = 10; # GiB
      preserveGenerations = "14d";
    };
  };

  # Command-line tools I commonly used and want available on most (or all) of my
  # machines.
  shell-utils = with pkgs; [
    bat
    coreutils
    direnv
    diskus
    emacs
    exa
    fd
    fzf
    git
    gnupg
    htop
    jq
    nmap
    pass
    python3
    rink
    ripgrep
    tldr
    tokei
    tree
    vim
    whois
    # TODO(wpcarro): Debug this failing build.
    # wpcarro.tools.simple_vim
    xclip
    zip
  ] ++
  (if pkgs.stdenv.isLinux then [
    mkpasswd
    sysz
    # This depends on compiler-rt-libc-10.0.1, which is marked as broken on
    # aarch64-darwin, but depot sets `allowBroken = true`, which means any
    # build that depends on dig will fail on OSX (e.g. emacs).
    # https://cs.tvl.fyi/github.com/NixOS/nixpkgs@e9b195248c6cd7961a453b10294aea9ab58e01b4/-/blob/pkgs/development/compilers/llvm/10/compiler-rt/default.nix?L122
    dig
  ] else [ ]);
}