-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhome.nix
246 lines (217 loc) · 5.72 KB
/
home.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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
{ config, pkgs, ... }:
{
programs.home-manager.enable = true;
nixpkgs.config.allowUnfreePredicate =
pkg:
builtins.elem (pkgs.lib.getName pkg) [
"terraform"
];
home.packages = with pkgs; [
ansible
argocd
asciinema
asciinema-agg
bundix
git-filter-repo
kubectl
kubernetes-helm
minikube
nerd-fonts.fira-code
nodejs
python3
ruby
terraform
tldr
vim
];
programs = {
awscli = {
enable = true;
};
direnv = {
enable = true;
enableZshIntegration = true;
nix-direnv.enable = true;
};
fzf = {
enable = true;
enableZshIntegration = true;
};
git = {
enable = true;
aliases = {
graph = "log --graph --oneline --decorate --all";
};
ignores = [
"*~"
"*.swp"
".DS_Store"
".direnv/"
];
userEmail = "27653146+dbreyfogle@users.noreply.github.com";
userName = "Danny Breyfogle";
extraConfig = {
init.defaultBranch = "main";
push.autoSetupRemote = "true";
};
};
gh = {
enable = true;
};
go = {
enable = true;
};
k9s = {
enable = true;
settings = {
k9s = {
ui = {
logoless = true;
noIcons = true;
};
};
};
};
neovim = {
enable = true;
defaultEditor = true;
extraPackages = with pkgs; [
fd
gcc
ripgrep
ansible-language-server
ansible-lint
bash-language-server
dockerfile-language-server-nodejs
golangci-lint
gopls
hadolint
helm-ls
lua-language-server
markdownlint-cli2
mypy
nixd
nixfmt-rfc-style
nodePackages.prettier
pyright
rubocop
ruff
shellcheck
shfmt
stylua
taplo
terraform-ls
tflint
vale
vscode-langservers-extracted
yaml-language-server
];
};
starship = {
enable = true;
enableZshIntegration = true;
};
tmux = {
enable = true;
plugins = with pkgs.tmuxPlugins; [
continuum
logging
resurrect
yank
];
extraConfig = ''
# [[ Keymaps ]]
# Pane navigation
bind j select-pane -D
bind k select-pane -U
bind h select-pane -L
bind l select-pane -R
# Use current path for new splits
bind '"' split-window -v -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
# Prompt navigation (OSC 133)
bind b copy-mode\; send-keys -X previous-prompt
bind B copy-mode\; send-keys -X next-prompt
# Convenience shortcuts
bind -r "<" swap-window -d -t -1
bind -r ">" swap-window -d -t +1
bind A setw synchronize-panes\; display-message "synchronize-panes: #{?pane_synchronized,on,off}"
bind S command-prompt -p "join-pane source:" "join-pane -s :'%%'"
bind T command-prompt -p "join-pane target:" "join-pane -t :'%%'"
# [[ Options ]]
# Window renaming
set -g allow-rename off
set -g renumber-windows on
# Display pane numbers until selected
bind -T prefix q display-panes -d 0
# Increase history limit
set -g history-limit 10000
# Vim-style copy
setw -g mode-keys vi
bind -T copy-mode-vi v send -X begin-selection
# Enable mouse usage
set -g mouse on
# Terminal colors
set -g default-terminal "tmux-256color"
set -ga terminal-overrides ",*256col*:Tc"
# Theme
set -g status-left ""
set -g status-right "#{?client_prefix,#[fg=green bold],#[fg=default]}[#S]#[fg=default nobold] #(date '+%a %b %-d %-I:%M %p')"
set -g status-style bg=default,fg=white
setw -g window-status-current-style fg=green,bold
'';
};
zsh = {
enable = true;
autosuggestion = {
enable = true;
strategy = [ "match_prev_cmd" ];
};
enableCompletion = true;
history.ignoreSpace = true;
oh-my-zsh = {
enable = true;
plugins = [
"argocd"
"aws"
"docker"
"docker-compose"
"git"
"helm"
"kubectl"
"terraform"
"tmux"
"z"
];
};
shellAliases = {
l = "ls -lFhAv --group-directories-first --color";
};
syntaxHighlighting.enable = true;
};
};
home.sessionVariables = {
MINIKUBE_IN_STYLE = "false";
VALE_CONFIG_PATH = "$HOME/.config/vale/.vale.ini";
VIRTUAL_ENV_DISABLE_PROMPT = 1;
ZSH_TMUX_AUTOSTART = "true";
ZSH_TMUX_AUTOQUIT = "false";
ZSH_TMUX_UNICODE = "true";
};
xdg.configFile = {
"alacritty/alacritty.toml".source =
config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/Repos/home-manager/dotfiles/alacritty/alacritty.toml";
"alacritty/themes".source =
config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/Repos/home-manager/dotfiles/alacritty/themes";
"nvim".source =
config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/Repos/home-manager/dotfiles/nvim";
"starship.toml".source =
config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/Repos/home-manager/dotfiles/starship/starship.toml";
"vale/.vale.ini".source =
config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/Repos/home-manager/dotfiles/vale/.vale.ini";
};
home.file = {
".vimrc".source =
config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/Repos/home-manager/dotfiles/vim/.vimrc";
};
}