-
Notifications
You must be signed in to change notification settings - Fork 5
/
default.nix
474 lines (426 loc) · 11.6 KB
/
default.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
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
{ pkgs, config, ... }:
let
vscode-wrapper = pkgs.writeShellScriptBin "code" ''
exec ${pkgs.sway-open}/bin/sway-open \
--app_id code-url-handler \
--new-window-argument="--new-window" \
-- \
${config.programs.vscode.package}/bin/code \
"$@"
'';
chromium-wrapper = pkgs.writeShellScriptBin "chromium" ''
exec ${pkgs.sway-open}/bin/sway-open \
--app_id chromium-browser \
--new-window-argument="--new-window" \
-- \
${config.programs.chromium.package}/bin/chromium \
"$@"
'';
in
{
imports = [
./modules/blueberry.nix
./modules/lxqt-policykit-agent.nix
./modules/xssproxy.nix
./modules/nushell.nix
];
config = {
home.packages = with pkgs; [
coin
nixfmt
bitwarden
insomnia
spotify
pavucontrol
fortune
cowsay
gdb
mplayer
imagemagick
nodejs
entr
socat
file
proot
qemu
awscli
darkhttpd
xclip
jq
nmap
graphviz
xfce.thunar
xfce.xfconf
xfce.tumbler
xfce.exo
volumeicon
keepassxc
jdk
libreoffice
speedcrunch
ffmpegthumbnailer
networkmanagerapplet
xsel
lxappearance
gitAndTools.hub
gitAndTools.gh
git-cola
# git-branchless
git-absorb
git-revise
gnome.file-roller
clang
slack
zoom-us
watchman
i3status
mono
inconsolata
liberation_ttf
ttf_bitstream_vera
gnupg
vlc
patchelf
docker-compose
httpie
gimp
feh
screen
nixpkgs-review
leafpad
mypaint
tiled
maven
yq-go
ripgrep
gnome.pomodoro
audacity
ffmpeg-full
zoxide
fd
procs
sd
bottom
# neo4j-desktop
watchexec
bitwarden-cli
xsv
q-text-as-data
httpie
delta
# luakit
nodePackages.zx
deno
# jujutsu
procs
element-desktop
thunderbird
inkscape
git-worktree-shell
# monado
meld
lsof
home-manager
difftastic
du-dust
fx
peek
cachix
tig
dua
chatgpt-cli
helix
nix-output-monitor
xdg-utils
devenv
ast-grep
# Prioritize the sway-open-wrappers.
(lib.hiPrio chromium-wrapper)
(lib.hiPrio vscode-wrapper)
];
dconf = {
enable = true;
settings = {
"org/gnome/desktop/sound" = {
event-sounds = false;
input-feedback-sounds = false;
};
};
};
programs.chromium.enable = true;
programs.terminator = {
enable = true;
config = {
global_config = {
inactive_color_offset = "1.0";
};
keybindings = {
go_next = "";
new_window = "<Primary><Shift>n";
};
profiles.default = {
background_color = "#002b36";
cursor_color = "#aaaaaa";
font = "SauceCodePro Nerd Font 11";
use_system_font = false;
foreground_color = "#839496";
show_titlebar = false;
scrollback_lines = 10000;
palette = "#073642:#dc322f:#859900:#b58900:#268bd2:#d33682:#2aa198:#eee8d5:#002b36:#cb4b16:#586e75:#657b83:#839496:#6c71c4:#93a1a1:#fdf6e3";
};
};
};
fonts.fontconfig.enable = true;
gtk = {
enable = true;
font = {
name = "Noto Sans 10";
package = pkgs.noto-fonts;
};
iconTheme = {
name = "Adwaita";
package = pkgs.gnome.adwaita-icon-theme;
};
theme = {
name = "Adwaita-dark";
package = pkgs.gnome.gnome-themes-extra;
};
gtk2.extraConfig = ''
gtk-error-bell = 0
'';
gtk3.extraConfig = { gtk-error-bell = 0; };
};
programs.ssh = {
enable = true;
matchBlocks = {
"beheer1.ioservice.net beheer1.stpst.nl beheer2.ioservice.net beheer2.stpst.nl" = {
user = "bob.vanderlinden";
forwardAgent = false;
identityFile = "~/.ssh/nedap_rsa";
};
"nl12* nl14* nl22* nl24* vm* nvs* nas* *.healthcare.nedap.local *.consul" = {
user = "bob.vanderlinden";
forwardAgent = false;
identityFile = "~/.ssh/nedap_rsa";
extraOptions."VerifyHostKeyDNS" = "no";
extraOptions."ProxyJump" = "beheer1.ioservice.net";
};
"127.0.0.1" = {
user = "bob.vanderlinden";
forwardAgent = false;
identityFile = "~/.ssh/nedap_rsa";
extraOptions."VerifyHostKeyDNS" = "no";
};
"github.com" = {
user = "git";
identityFile = "~/.ssh/github_ed25519";
};
};
forwardAgent = false;
serverAliveInterval = 180;
};
programs.fzf.enable = true;
programs.bat.enable = true;
programs.fish = {
enable = true;
interactiveShellInit = ''
set fish_greeting
'';
};
programs.nushell = {
enable = true;
settingss.show_banner = false;
extraConfig = ''
source ${pkgs.fetchurl {
url = "https://raw.githubusercontent.com/nushell/nu_scripts/e3b02b38eeece7c4ab8c20198cd36c6b12d5c3e4/background_task/job.nu";
hash = "sha256-L+SrTstXey9WhT4gHD4Wu++HEIMsh1LaNjWd2ouRLjI=";
}}
'';
shellAliases = config.home.shellAliases;
};
services.pueue = {
enable = true;
settings.shared.use_unix_socket = true;
};
programs.starship = {
enable = true;
settings = {
character = {
success_symbol = "[\\$](bold blue)";
error_symbol = "[\\$](bold red)";
};
};
};
programs.atuin = {
enable = true;
flags = ["--disable-up-arrow"];
settings = {
auto_sync = false;
update_check = false;
style = "compact";
};
};
programs.zoxide.enable = true;
programs.carapace.enable = true;
qt = {
enable = true;
platformTheme = "gnome";
style = {
name = "adwaita-dark";
package = pkgs.adwaita-qt;
};
};
services.gpg-agent.enable = true;
services.network-manager-applet.enable = true;
services.blueberry.enable = true;
services.mpris-proxy.enable = true;
services.flameshot = {
enable = true;
package = pkgs.flameshot.overrideAttrs (oldAttrs: {
buildInputs = oldAttrs.buildInputs ++ [ pkgs.libsForQt5.kguiaddons ];
cmakeFlags = [
"-DUSE_WAYLAND_CLIPBOARD=true"
];
});
};
services.darkman = {
enable = true;
settings = {
usegeoclue = true;
};
};
services.gammastep = {
enable = true;
provider = "geoclue2";
temperature.day = 5500;
temperature.night = 3700;
tray = true;
};
services.xsettingsd.enable = true;
services.xsettingsd.settings = {
"Net/ThemeName" = "Adwaita-dark";
"Xft/Antialias" = true;
"Xft/Hinting" = true;
"Xft/RGBA" = "rgb";
};
services.xssproxy.enable = false;
services.lxqt-policykit-agent.enable = true;
services.pasystray.enable = true;
xdg.enable = true;
# news.display = "silent";
home.pointerCursor = {
x11.enable = true;
name = "Vanilla-DMZ";
package = pkgs.vanilla-dmz;
size = 128;
};
home.shellAliases = {
g = "git";
};
programs.git = {
enable = true;
userName = "Bob van der Linden";
userEmail = "[email protected]";
delta.enable = true;
aliases = {
unstage = "reset HEAD --";
co = "checkout";
c = "commit";
b = "branch";
p = "push";
pf = "push --force-with-lease --force";
d = "diff";
a = "add";
s = "status";
f = "fetch";
t = "tag";
bl = "blame -w -C -C -C";
l = "log --graph --pretty='%Cred%h%Creset - %C(bold blue)<%an>%Creset %s%C(yellow)%d%Creset %Cgreen(%cr)' --abbrev-commit --date=relative";
fixup = "commit --fixup";
pr-diff = "diff upstream/HEAD..";
pr-log = "l upstream/HEAD..";
pr-edit = "rebase --interactive --autosquash --rerere-autoupdate --rebase-merges --fork-point upstream/HEAD";
pr-clean = "rebase --autosquash --rerere-autoupdate --empty drop --no-keep-empty --fork-point upstream/HEAD";
pr-update = "pull --rebase=merges upstream HEAD";
};
ignores = [
"vendor"
"workspace.code-workspace"
# Always ignore devenv.sh temporary files.
".devenv"
".devenv.flake.nix"
];
extraConfig = {
init.defaultBranch = "main";
core.editor = "code --wait";
# Show diffs with syntax highlighting.
diff.external = "${pkgs.difftastic}/bin/difft";
# Use saner diff prefixes than a/ and b/.
diff.mnemonicPrefix = true;
diff.algorithm = "patience";
# Show original in-between ours and theirs.
merge.conflictstyle = "diff3";
# Show moved lines in diff.
diff.colorMoved = "zebra";
push.default = "current";
push.autoSetupRemote = true;
pull.rebase = false;
url."[email protected]:".insteadOf = [
# Normalize GitHub URLs to SSH to avoid authentication issues with HTTPS.
"https://github.com/"
# Allows typing `git clone github:owner/repo`.
"github:"
];
# Sort last committed branches to top.
branch.sort = "-committerdate";
# Sort highest version to top.
tag.sort = "-v:refname";
# Record and replay conflict resolutions.
rerere.enabled = true;
# Show diff in commit message editor.
commit.verbose = true;
# Sign commits using SSH public key.
gpg.format = "ssh";
user.signingkey = "~/.ssh/github_ed25519.pub";
commit.gpgSign = true;
tag.gpgSign = true;
gpg.program = "${pkgs.gnupg}/bin/gpg2";
# Avoid hint: use --reapply-cherry-picks to include skipped commits
advice.skippedCherryPicks = false;
# Source: https://github.com/rust-lang/cargo/issues/3381#issuecomment-1193730972
# avoid issues where the cargo-edit tool tries to clone from a repo you do not have WRITE access to.
# we already use SSH for every github repo, and so this puts the clone back to using HTTPS.
url."https://github.com/rust-lang/crates.io-index".insteadOf = "https://github.com/rust-lang/crates.io-index";
# avoid issues where the `cargo audit` command tries to clone from a repo you do not have WRITE access to.
# we already use SSH for every github repo, and so this puts the clone back to using HTTPS.
url."https://github.com/RustSec/advisory-db".insteadOf = "https://github.com/RustSec/advisory-db";
};
};
programs.vscode = {
enable = true;
};
programs.gh = {
enable = true;
settings = {
# See https://github.com/nix-community/home-manager/issues/4744
version = "1";
editor = "code --wait";
};
};
programs.jq.enable = true;
programs.neovim.enable = true;
programs.nix-index.enable = true;
home.sessionVariables = {
BROWSER = "chromium";
};
programs.direnv = {
enable = true;
nix-direnv.enable = true;
# Store .envrc files outside of project directories.
# Source: https://github.com/nix-community/nix-direnv#storing-direnv-outside-the-project-directory
stdlib = builtins.readFile ./direnvrc;
};
programs.htop.enable = true;
home.stateVersion = "21.03";
};
}