-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhome.nix
341 lines (329 loc) · 9.69 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
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
{
config,
pkgs,
...
}: {
home = {
packages = with pkgs; [
bottom
dust
google-chrome
hyperfine
ouch
sd
termusic
];
stateVersion = "23.11";
};
programs = {
bash = {
enable = true;
initExtra = ''
git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
export PS1="\u@\h \[\033[32m\]\w\[\033[33m\]\$(git_branch)\[\033[00m\] "
export TMPDIR=/tmp
'';
sessionVariables = {};
shellAliases = {
top = "btm --theme default-light";
vi = "nvim";
};
};
bat = {
enable = true;
config.theme = "GitHub";
};
direnv = {
enable = true;
nix-direnv.enable = true;
};
eza = {
enable = true;
git = true;
};
foot = {
enable = true;
server.enable = true;
settings = {
main = {
font = "JetBrainsMono:size=13";
dpi-aware = "yes";
pad = "8x4";
};
colors = {
alpha = "1.0";
foreground = "21201d"; # black
background = "fff8e1"; # amber
regular0 = "21201d"; # black
regular1 = "cd4340"; # red
regular2 = "498d49"; # green
regular3 = "fab32d"; # yellow
regular4 = "3378c4"; # blue
regular5 = "b83269"; # magenta
regular6 = "21929a"; # cyan
regular7 = "ffd7d7"; # white
bright0 = "66635a"; # bright black
bright1 = "dd7b72"; # bright red
bright2 = "82ae78"; # bright green
bright3 = "fbc870"; # bright yellow
bright4 = "73a0cd"; # bright blue
bright5 = "ce6f8e"; # bright magenta
bright6 = "548c94"; # bright cyan
bright7 = "ffe1da"; # bright white
dim0 = "9e9a8c"; # dim black
dim1 = "e9a99b"; # dim red
dim2 = "b0c99f"; # dim green
dim3 = "fdda9a"; # dim yellow
dim4 = "a6c0d4"; # dim blue
dim5 = "e0a1ad"; # dim magenta
dim6 = "3c6064"; # dim cyan
dim7 = "ffe9dd"; # dim white
};
key-bindings = {
scrollback-up-page = "Control+b";
scrollback-up-half-page = "Control+u";
scrollback-up-line = "none";
scrollback-down-page = "Control+f";
scrollback-down-half-page = "Control+d";
scrollback-down-line = "none";
clipboard-copy = "Control+y XF86Copy";
clipboard-paste = "Control+p XF86Paste";
primary-paste = "none";
search-start = "Control+slash";
font-increase = "none";
font-decrease = "none";
font-reset = "none";
spawn-terminal = "none";
minimize = "none";
maximize = "none";
fullscreen = "none";
show-urls-launch = "none";
show-urls-copy = "none";
show-urls-persistent = "none";
noop = "none";
};
search-bindings = {
cancel = "Control+c Escape";
commit = "Return";
find-prev = "Control+Shift+n";
find-next = "Control+n";
cursor-left = "none";
cursor-left-word = "none";
cursor-right = "none";
cursor-right-word = "none";
cursor-home = "none";
cursor-end = "none";
delete-prev = "none";
delete-prev-word = "none";
delete-next = "none";
delete-next-word = "none";
extend-to-word-boundary = "none";
extend-to-next-whitespace = "none";
clipboard-paste = "none";
primary-paste = "none";
};
url-bindings = {
cancel = "none";
toggle-url-visible = "none";
};
};
};
git = {
enable = true;
extraConfig = {
commit.gpgsign = true;
gpg.format = "ssh";
init.defaultBranch = "main";
user.signingkey = "~/.ssh/id_ed25519.pub";
};
delta = {
enable = true;
options = {
navigate = true;
light = true;
line-numbers = true;
};
};
userEmail = "[email protected]";
userName = "jaroeichler";
};
mpv = {
enable = true;
config = {
interpolation = "yes";
profile = "gpu-hq";
sub-border-size = 1;
sub-font-size = 56;
target-prim = "bt.709";
target-trc = "srgb";
tscale = "oversample";
video-sync = "display-resample";
vo = "gpu-next";
};
};
neovim = {
enable = true;
extraConfig = ''
autocmd FileType nix setlocal sw=2 ts=2
autocmd FileType typst setlocal sw=2 ts=2
filetype plugin indent on
highlight colorcolumn ctermbg=white
highlight visual ctermbg=white
noremap <D-h> :bd<CR>
noremap <D-j> :bp<CR>
noremap <D-k> :bn<CR>
noremap <D-l> :write<CR>
noremap <D-\> 081l<S-f><Space>r<Enter>
set clipboard=unnamedplus
set colorcolumn=81
set expandtab
set notermguicolors
set shiftwidth=4
set tabstop=4
'';
extraLuaConfig = ''
vim.filetype.add({
extension = {
typ = 'typst',
},
})
'';
plugins = with pkgs.vimPlugins; [
{
plugin = ale;
config = ''
highlight aleerror ctermbg=white
highlight aleerrorline ctermbg=lightyellow
highlight alewarning ctermbg=white
highlight alewarningline ctermbg=lightyellow
highlight aleinfo ctermbg=white
highlight aleinfoline ctermbg=lightyellow
let g:ale_set_signs=0
let g:ale_linters = {
\ 'cpp': ['clangtidy'],
\}
let g:ale_fixers = {
\ 'cpp': ['clangtidy'],
\ 'nix': ['nixfmt', 'trim_whitespace'],
\}
'';
}
{
plugin = nvim-treesitter.withAllGrammars;
type = "lua";
config = ''
require'nvim-treesitter.configs'.setup {
highlight = {
additional_vim_regex_highlighting = false,
enable = true,
indent = {
enable = true
}
},
}
'';
}
];
};
tealdeer = {
enable = true;
settings.updates.auto_update = true;
};
zathura = {
enable = true;
package = pkgs.zathura.override {
useMupdf = false;
};
options = {
completion-bg = "#fff8e1";
completion-fg = "#21201d";
completion-group-bg = "#fff8e1";
completion-group-fg = "#21201d";
completion-highlight-bg = "#fff8e1";
completion-highlight-fg = "#21201d";
default-bg = "#fff8e1";
default-fg = "#21201d";
font = "JetBrainsMono 13";
highlight-active-color = "#fab32d";
highlight-color = "#fdda9a";
index-active-bg = "#fff8e1";
index-active-fg = "#21201d";
index-bg = "#fff8e1";
index-fg = "#21201d";
inputbar-bg = "#fff8e1";
inputbar-fg = "#21201d";
notification-bg = "#fff8e1";
notification-error-bg = "#fff8e1";
notification-error-fg = "#cd4340";
notification-fg = "#fab32d";
notification-warning-bg = "#fff8e1";
notification-warning-fg = "#cd4304";
recolor = "true";
recolor-darkcolor = "#21201d";
recolor-lightcolor = "#fff8e1";
selection-clipboard = "clipboard";
statusbar-bg = "#fff8e1";
statusbar-fg = "#21201d";
};
};
zoxide = {
enable = true;
};
};
wayland.windowManager.sway = {
enable = true;
config = {
bars = [];
defaultWorkspace = "workspace number 1";
floating.border = 0;
input = {
"type:keyboard" = {
xkb_options = "caps:escape";
};
};
keybindings = {
# Basics.
"Mod1+q" = "kill";
"Mod1+d" = "exec google-chrome-stable";
"Mod1+Return" = "exec foot";
# Moving.
"Mod1+j" = "focus left";
"Mod1+k" = "focus right";
"Mod1+Shift+j" = "move left";
"Mod1+Shift+k" = "move right";
# Volume.
"XF86AudioLowerVolume" = "exec wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%-";
"XF86AudioMute" = "exec wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
"XF86AudioRaiseVolume" = "exec wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+";
# Workspaces.
"Mod1+1" = "workspace number 1";
"Mod1+2" = "workspace number 2";
"Mod1+3" = "workspace number 3";
"Mod1+4" = "workspace number 4";
"Mod1+5" = "workspace number 5";
"Mod1+6" = "workspace number 6";
"Mod1+7" = "workspace number 7";
"Mod1+8" = "workspace number 8";
"Mod1+9" = "workspace number 9";
"Mod1+0" = "workspace number 10";
"Mod1+Shift+1" = "move container to workspace number 1";
"Mod1+Shift+2" = "move container to workspace number 2";
"Mod1+Shift+3" = "move container to workspace number 3";
"Mod1+Shift+4" = "move container to workspace number 4";
"Mod1+Shift+5" = "move container to workspace number 5";
"Mod1+Shift+6" = "move container to workspace number 6";
"Mod1+Shift+7" = "move container to workspace number 7";
"Mod1+Shift+8" = "move container to workspace number 8";
"Mod1+Shift+9" = "move container to workspace number 9";
"Mod1+Shift+0" = "move container to workspace number 10";
};
window = {
border = 0;
titlebar = false;
};
};
wrapperFeatures.gtk = true;
};
}