-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommon-dev-tools.nix
143 lines (125 loc) · 3.78 KB
/
common-dev-tools.nix
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
{ pkgs, stdenv, lib, ... }:
let
httpyac = pkgs.buildNpmPackage rec {
pname = "httpyac";
version = "6.8.1";
src = pkgs.fetchFromGitHub {
owner = "AnWeber";
repo = pname;
rev = version;
hash = "sha256-bXBs26saUshuL/1LvHf5SD/bLmWLBp48viJyRrqScwY=";
};
npmDepsHash = "sha256-LtNssp0+IXcEAKyzXGdbjcdpowobW0YAnCk0lxNgVmA=";
npmBuildScript = "esbuild";
npmPackFlags = [ "--ignore-scripts" ];
NODE_OPTIONS = "--openssl-legacy-provider";
};
gdk = pkgs.google-cloud-sdk.withExtraComponents( with pkgs.google-cloud-sdk.components; [
gke-gcloud-auth-plugin
]);
in
{
imports = [
./neovim.nix
./shells.nix
./minimal.nix
./vscode.nix
./kitty.nix
./azure.nix
];
home.packages = with pkgs; [
# CLI tools
jq # TODO: Install as program w/conf
eza
bat # TODO: Install as program w/conf
fd
ripgrep
tldr
htop
curl # TODO: check vs curlFull
inetutils
tree # For fzf
entr
procps # watch
httpie
gh # GitHub CLI
actionlint
httpyac
peco
diff-so-fancy
# Python
python3
poetry
# JavaScript
nodejs
nodePackages.npm
yarn
# Go
go
# Cloud and k8s
doctl
kubectl
kubernetes-helm
terraform
fluxcd
kustomize
linkerd
awscli2
gdk
grafana-loki
go-jsonnet # This is faster than jsonnet
argocd
# Other development
nodePackages.gitmoji-cli
];
programs.tmux = {
enable = true;
clock24 = true;
sensibleOnTop = false;
shell = "${pkgs.zsh}/bin/zsh";
escapeTime = 10; # Recommended for neovim
terminal = "xterm-256color"; # Gives warnings in neovim, but fixes the 'clear' issue without messing with terminfo & tic
historyLimit = 20000;
extraConfig = ''
setw -g monitor-activity on
set -g visual-activity on
set -g mode-keys vi
set -g focus-events on
bind-key -T copy-mode-vi 'v' send -X begin-selection
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip -in -selection clipboard'
bind-key r source-file ~/.tmux.conf \; display-message "tmux conf reloaded"
# Smart pane switching with awareness of Vim splits.
# See: https://github.com/christoomey/vim-tmux-navigator
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
bind-key -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"
bind-key -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D"
bind-key -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
bind-key -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"
bind-key -n C-\\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l"
bind-key -T copy-mode-vi C-h select-pane -L
bind-key -T copy-mode-vi C-j select-pane -D
bind-key -T copy-mode-vi C-k select-pane -U
bind-key -T copy-mode-vi C-l select-pane -R
bind-key -T copy-mode-vi C-\\ select-pane -l
'';
};
programs.fzf = {
enable = true;
enableBashIntegration = true;
enableZshIntegration = true;
# Use fd for fzf
defaultCommand = "${pkgs.fd}/bin/fd --type f --hidden --follow --exclude .git";
changeDirWidgetCommand = "${pkgs.fd}/bin/fd --type d --hidden --follow --exclude .git";
fileWidgetCommand = "${pkgs.fd}/bin/fd --type f --hidden --follow --exclude .git";
changeDirWidgetOptions = [ "--preview 'tree -C {} | head -200'" ];
fileWidgetOptions = [ "--preview '${pkgs.bat}/bin/bat --color=always --style=numbers {} | head -500'" ];
};
programs.direnv = {
enable = true;
enableBashIntegration = true;
enableZshIntegration = true;
# TODO: Check nix-direnv docs for disabling garbage collection
nix-direnv.enable = true;
};
}