-
-
Notifications
You must be signed in to change notification settings - Fork 23
/
default.nix
1089 lines (1061 loc) · 33.9 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
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{
config,
inputs,
isLima,
isWorkstation,
lib,
outputs,
pkgs,
stateVersion,
username,
...
}:
let
inherit (pkgs.stdenv) isDarwin isLinux;
in
{
imports = [
# If you want to use modules your own flake exports (from modules/home-manager):
# outputs.homeManagerModules.example
# Modules exported from other flakes:
inputs.catppuccin.homeManagerModules.catppuccin
inputs.sops-nix.homeManagerModules.sops
inputs.nix-index-database.hmModules.nix-index
./_mixins/features
./_mixins/scripts
./_mixins/services
./_mixins/users
] ++ lib.optional isWorkstation ./_mixins/desktop;
catppuccin = {
accent = "blue";
flavor = "mocha";
};
home = {
inherit stateVersion;
inherit username;
homeDirectory =
if isDarwin then
"/Users/${username}"
else if isLima then
"/home/${username}.linux"
else
"/home/${username}";
file = {
"${config.xdg.configHome}/fastfetch/config.jsonc".text = builtins.readFile ./_mixins/configs/fastfetch.jsonc;
"${config.xdg.configHome}/gh-dash/config.yml".text = builtins.readFile ./_mixins/configs/gh-dash-catppuccin-mocha-blue.yml;
"${config.xdg.configHome}/yazi/keymap.toml".text = builtins.readFile ./_mixins/configs/yazi-keymap.toml;
"${config.xdg.configHome}/fish/functions/help.fish".text = builtins.readFile ./_mixins/configs/help.fish;
"${config.xdg.configHome}/fish/functions/h.fish".text = builtins.readFile ./_mixins/configs/h.fish;
".hidden".text = ''snap'';
};
# A Modern Unix experience
# https://jvns.ca/blog/2022/04/12/a-list-of-new-ish--command-line-tools/
packages =
with pkgs;
[
asciicam # Terminal webcam
asciinema-agg # Convert asciinema to .gif
asciinema # Terminal recorder
bc # Terminal calculator
bandwhich # Modern Unix `iftop`
bmon # Modern Unix `iftop`
breezy # Terminal bzr client
#butler # Terminal Itch.io API client
chafa # Terminal image viewer
chroma # Code syntax highlighter
clinfo # Terminal OpenCL info
cpufetch # Terminal CPU info
croc # Terminal file transfer
curlie # Terminal HTTP client
cyme # Modern Unix `lsusb`
dconf2nix # Nix code from Dconf files
deadnix # Nix dead code finder
difftastic # Modern Unix `diff`
dogdns # Modern Unix `dig`
dotacat # Modern Unix lolcat
dua # Modern Unix `du`
duf # Modern Unix `df`
du-dust # Modern Unix `du`
editorconfig-core-c # EditorConfig Core
entr # Modern Unix `watch`
fastfetch # Modern Unix system info
fd # Modern Unix `find`
file # Terminal file info
frogmouth # Terminal mardown viewer
glow # Terminal Markdown renderer
girouette # Modern Unix weather
gocryptfs # Terminal encrypted filesystem
gping # Modern Unix `ping`
git-igitt # Modern Unix git log/graph
h # Modern Unix autojump for git projects
hexyl # Modern Unix `hexedit`
hr # Terminal horizontal rule
httpie # Terminal HTTP client
hueadm # Terminal Philips Hue client
hyperfine # Terminal benchmarking
iperf3 # Terminal network benchmarking
ipfetch # Terminal IP info
jpegoptim # Terminal JPEG optimizer
jiq # Modern Unix `jq`
lastpass-cli # Terminal LastPass client
lima-bin # Terminal VM manager
marp-cli # Terminal Markdown presenter
mtr # Modern Unix `traceroute`
neo-cowsay # Terminal ASCII cows
netdiscover # Modern Unix `arp`
nixfmt-rfc-style # Nix code formatter
nixpkgs-review # Nix code review
nix-prefetch-scripts # Nix code fetcher
nurl # Nix URL fetcher
nyancat # Terminal rainbow spewing feline
onefetch # Terminal git project info
optipng # Terminal PNG optimizer
procs # Modern Unix `ps`
quilt # Terminal patch manager
rclone # Modern Unix `rsync`
rsync # Traditional `rsync`
sd # Modern Unix `sed`
speedtest-go # Terminal speedtest.net
terminal-parrot # Terminal ASCII parrot
timer # Terminal timer
tldr # Modern Unix `man`
tokei # Modern Unix `wc` for code
tty-clock # Terminal clock
ueberzugpp # Terminal image viewer integration
unzip # Terminal ZIP extractor
upterm # Terminal sharing
wget # Terminal HTTP client
wget2 # Terminal HTTP client
wormhole-william # Terminal file transfer
yq-go # Terminal `jq` for YAML
]
++ lib.optionals isLinux [
figlet # Terminal ASCII banners
iw # Terminal WiFi info
lurk # Modern Unix `strace`
pciutils # Terminal PCI info
psmisc # Traditional `ps`
ramfetch # Terminal system info
s-tui # Terminal CPU stress test
stress-ng # Terminal CPU stress test
usbutils # Terminal USB info
wavemon # Terminal WiFi monitor
writedisk # Modern Unix `dd`
zsync # Terminal file sync; FTBFS on aarch64-darwin
]
++ lib.optionals isDarwin [
m-cli # Terminal Swiss Army Knife for macOS
nh
coreutils
];
sessionVariables = {
EDITOR = "micro";
MANPAGER = "sh -c 'col --no-backspaces --spaces | bat --language man'";
MANROFFOPT = "-c";
MICRO_TRUECOLOR = "1";
PAGER = "bat";
SYSTEMD_EDITOR = "micro";
VISUAL = "micro";
};
};
fonts.fontconfig.enable = true;
# Workaround home-manager bug with flakes
# - https://github.com/nix-community/home-manager/issues/2033
news.display = "silent";
nixpkgs = {
overlays = [
# Add overlays your own flake exports (from overlays and pkgs dir):
outputs.overlays.additions
outputs.overlays.modifications
outputs.overlays.unstable-packages
];
# Configure your nixpkgs instance
config = {
allowUnfree = true;
};
};
nix = {
package = pkgs.nixVersions.latest;
settings = {
experimental-features = "flakes nix-command";
trusted-users = [
"root"
"${username}"
];
};
};
programs = {
aria2.enable = true;
atuin = {
enable = true;
enableBashIntegration = true;
enableFishIntegration = true;
enableZshIntegration = true;
flags = [ "--disable-up-arrow" ];
package = pkgs.atuin;
settings = {
auto_sync = true;
dialect = "uk";
key_path = config.sops.secrets.atuin_key.path;
show_preview = true;
style = "compact";
sync_frequency = "1h";
sync_address = "https://api.atuin.sh";
update_check = false;
};
};
bat = {
catppuccin.enable = true;
enable = true;
extraPackages = with pkgs.bat-extras; [
batgrep
batwatch
prettybat
];
config = {
style = "plain";
};
};
bottom = {
catppuccin.enable = true;
enable = true;
settings = {
disk_filter = {
is_list_ignored = true;
list = [ "/dev/loop" ];
regex = true;
case_sensitive = false;
whole_word = false;
};
flags = {
dot_marker = false;
enable_gpu_memory = true;
group_processes = true;
hide_table_gap = true;
mem_as_value = true;
tree = true;
};
};
};
cava = {
catppuccin.enable = true;
# TODO: Enable when this is released:
# https://github.com/NixOS/nixpkgs/pull/356667
enable = false;
};
dircolors = {
enable = true;
enableBashIntegration = true;
enableFishIntegration = true;
enableZshIntegration = true;
};
direnv = {
enable = true;
enableBashIntegration = true;
enableZshIntegration = true;
nix-direnv = {
enable = true;
};
};
eza = {
enable = true;
enableBashIntegration = true;
enableFishIntegration = true;
enableZshIntegration = true;
extraOptions = [
"--group-directories-first"
"--header"
];
git = true;
icons = "auto";
};
fish = {
catppuccin.enable = true;
enable = true;
shellAliases = {
banner = lib.mkIf isLinux "${pkgs.figlet}/bin/figlet";
banner-color = lib.mkIf isLinux "${pkgs.figlet}/bin/figlet $argv | ${pkgs.dotacat}/bin/dotacat";
brg = "${pkgs.bat-extras.batgrep}/bin/batgrep";
cat = "${pkgs.bat}/bin/bat --paging=never";
clock = ''${pkgs.tty-clock}/bin/tty-clock -B -c -C 4 -f "%a, %d %b"'';
dadjoke = ''${pkgs.curlMinimal}/bin/curl --header "Accept: text/plain" https://icanhazdadjoke.com/'';
dmesg = "${pkgs.util-linux}/bin/dmesg --human --color=always";
neofetch = "${pkgs.fastfetch}/bin/fastfetch";
glow = "${pkgs.glow}/bin/glow --pager";
hr = ''${pkgs.hr}/bin/hr "─━"'';
htop = "${pkgs.bottom}/bin/btm --basic --tree --hide_table_gap --dot_marker --mem_as_value";
ip = lib.mkIf isLinux "${pkgs.iproute2}/bin/ip --color --brief";
less = "${pkgs.bat}/bin/bat";
lm = "${pkgs.lima-bin}/bin/limactl";
lolcat = "${pkgs.dotacat}/bin/dotacat";
moon = "${pkgs.curlMinimal}/bin/curl -s wttr.in/Moon";
more = "${pkgs.bat}/bin/bat";
parrot = "${pkgs.terminal-parrot}/bin/terminal-parrot -delay 50 -loops 7";
pq = "${pkgs.pueue}/bin/pueue";
ruler = ''${pkgs.hr}/bin/hr "╭─³⁴⁵⁶⁷⁸─╮"'';
screenfetch = "${pkgs.fastfetch}/bin/fastfetch";
speedtest = "${pkgs.speedtest-go}/bin/speedtest-go";
store-path = "${pkgs.coreutils-full}/bin/readlink (${pkgs.which}/bin/which $argv)";
top = "${pkgs.bottom}/bin/btm --basic --tree --hide_table_gap --dot_marker --mem_as_value";
tree = "${pkgs.eza}/bin/eza --tree";
wormhole = "${pkgs.wormhole-william}/bin/wormhole-william";
weather = "${lib.getExe pkgs.girouette} --quiet";
weather-home = "${lib.getExe pkgs.girouette} --quiet --location Basingstoke";
where-am-i = "${pkgs.geoclue2}/libexec/geoclue-2.0/demos/where-am-i";
lock-armstrong = "fusermount -u ~/Vaults/Armstrong";
unlock-armstrong = "${pkgs.gocryptfs}/bin/gocryptfs ~/Crypt/Armstrong ~/Vaults/Armstrong";
lock-secrets = "fusermount -u ~/Vaults/Secrets";
unlock-secrets = "${pkgs.gocryptfs}/bin/gocryptfs ~/Crypt/Secrets ~/Vaults/Secrets";
};
};
fzf = {
catppuccin.enable = true;
enable = true;
enableBashIntegration = true;
enableFishIntegration = true;
};
gh = {
enable = true;
extensions = with pkgs; [
gh-dash
gh-markdown-preview
];
settings = {
editor = "micro";
git_protocol = "ssh";
prompt = "enabled";
};
};
git = {
enable = true;
aliases = {
ci = "commit";
cl = "clone";
co = "checkout";
purr = "pull --rebase";
dlog = "!f() { GIT_EXTERNAL_DIFF=difft git log -p --ext-diff $@; }; f";
dshow = "!f() { GIT_EXTERNAL_DIFF=difft git show --ext-diff $@; }; f";
fucked = "reset --hard";
graph = "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit";
};
difftastic = {
display = "side-by-side-show-both";
enable = true;
};
extraConfig = {
advice = {
statusHints = false;
};
color = {
branch = false;
diff = false;
interactive = true;
log = false;
status = true;
ui = false;
};
core = {
pager = "bat";
};
push = {
default = "matching";
};
pull = {
rebase = false;
};
init = {
defaultBranch = "main";
};
};
ignores = [
"*.log"
"*.out"
".DS_Store"
"bin/"
"dist/"
"result"
];
};
gitui = {
catppuccin.enable = true;
enable = true;
};
gpg.enable = true;
home-manager.enable = true;
info.enable = true;
jq.enable = true;
micro = {
catppuccin.enable = true;
enable = true;
settings = {
autosu = true;
diffgutter = true;
paste = true;
rmtrailingws = true;
savecursor = true;
saveundo = true;
scrollbar = true;
scrollbarchar = "░";
scrollmargin = 4;
scrollspeed = 1;
};
};
neovim = {
enable = true;
catppuccin.enable = true;
plugins = with pkgs.vimPlugins; [
vim-rsi
packer-nvim
];
extraLuaConfig = ''
-- Force insert mode and hide mode display
vim.api.nvim_create_autocmd({"VimEnter", "BufRead", "BufNewFile", "BufEnter", "ModeChanged"}, {
pattern = "*",
callback = function()
vim.cmd('startinsert')
vim.api.nvim_set_option('showmode', false)
end
})
-- Make sure visual mode always returns to insert
vim.api.nvim_create_autocmd('ModeChanged', {
pattern = '[vV\x16]*:*',
callback = function()
vim.cmd('startinsert')
end
})
-- Force insert mode on mode switch attempts
vim.keymap.set('n', '<Esc>', 'i', { noremap = true })
vim.keymap.set('v', '<Esc>', 'i', { noremap = true })
vim.keymap.set('n', 'i', 'i', { noremap = true })
vim.keymap.set('n', 'a', 'i', { noremap = true })
-- CUA keybindings with forced quit
local opts = { noremap = true, silent = true }
vim.keymap.set('i', '<C-s>', '<Cmd>w<CR>', opts)
-- Quit, but check for unsaved changes
vim.keymap.set('i', '<C-q>', function()
if vim.fn.getbufinfo('%')[1].changed == 1 then
local choice = vim.fn.confirm("Save changes before quitting?", "&Yes\n&No\n&Cancel", 1)
if choice == 1 then -- Yes
vim.cmd('wa')
vim.cmd('qa')
elseif choice == 2 then -- No
vim.cmd('qa!')
end
-- If choice == 3 (Cancel), do nothing
else
vim.cmd('qa')
end
end, opts)
vim.keymap.set('i', '<C-z>', '<C-o>u', opts)
vim.keymap.set('i', '<C-y>', '<C-o><C-r>', opts)
vim.keymap.set('i', '<C-v>', '<C-r>+', opts)
-- Replace the Ctrl+C mappings with:
vim.keymap.set('i', '<C-c>', '<C-o>yy<Esc>i', opts)
vim.keymap.set('v', '<C-c>', 'y<Esc>i', opts)
vim.keymap.set('i', '<C-x>', 'd', opts)
-- Shift + Arrow selection
vim.keymap.set('i', '<S-Left>', '<C-o>v0', opts)
vim.keymap.set('i', '<S-Right>', '<C-o>v$', opts)
vim.keymap.set('i', '<S-Up>', '<Up><C-o>v', opts)
vim.keymap.set('i', '<S-Down>', '<Down><C-o>v', opts)
vim.keymap.set('v', '<S-Left>', '<Left>', opts)
vim.keymap.set('v', '<S-Right>', '<Right>', opts)
vim.keymap.set('v', '<S-Up>', '<Up>', opts)
vim.keymap.set('v', '<S-Down>', '<Down>', opts)
-- Make sure Escape returns to insert mode
vim.keymap.set('v', '<Esc>', '<Esc>i', opts)
-- Disable Shift + Arrow page movement
vim.keymap.set('i', '<S-PageUp>', '<PageUp>', opts)
vim.keymap.set('i', '<S-PageDown>', '<PageDown>', opts)
vim.keymap.set('i', '<S-Up>', '<Up><C-o>v', opts) -- Ensure these only do selection
vim.keymap.set('i', '<S-Down>', '<Down><C-o>v', opts)
-- Map actual page movement to PageUp/PageDown
vim.keymap.set('i', '<PageUp>', '<C-o><C-b>', opts)
vim.keymap.set('i', '<PageDown>', '<C-o><C-f>', opts)
-- Search functionality (Ctrl+F)
vim.keymap.set('i', '<C-f>', function()
local current_pos = vim.fn.getcurpos()
vim.cmd('normal! i') -- Ensure we're in insert mode
vim.fn.feedkeys('/', 'n') -- Start search mode
-- Setup autocmd to return to insert mode when search is done
vim.api.nvim_create_autocmd('CmdlineLeave', {
pattern = '/',
once = true,
callback = function()
vim.schedule(function()
vim.cmd('startinsert')
-- Restore cursor position if search was cancelled
if vim.fn.mode() == 'n' then
vim.fn.setpos('.', current_pos)
vim.cmd('startinsert')
end
end)
end
})
end, opts)
-- Make sure search highlighting can be cleared
vim.keymap.set('i', '<Esc>', function()
vim.cmd('nohlsearch')
vim.cmd('startinsert')
end, opts)
-- Basic settings
vim.opt.mouse = 'a'
vim.opt.mousemodel = 'popup'
vim.opt.number = true
vim.opt.relativenumber = false
vim.opt.wrap = false
vim.opt.clipboard = 'unnamedplus'
'';
};
nix-index.enable = true;
powerline-go = {
enable = false;
settings = {
cwd-max-depth = 5;
cwd-max-dir-size = 12;
theme = "gruvbox";
max-width = 60;
};
};
ripgrep = {
arguments = [
"--colors=line:style:bold"
"--max-columns-preview"
"--smart-case"
];
enable = true;
};
starship = {
enable = true;
enableBashIntegration = true;
enableFishIntegration = true;
catppuccin.enable = true;
# https://github.com/etrigan63/Catppuccin-starship
settings = {
add_newline = false;
command_timeout = 1000;
time = {
disabled = true;
};
format = lib.concatStrings [
"[](surface1)"
"$os"
"[](bg:surface2 fg:surface1)"
"$username"
"$sudo"
"[](bg:overlay0 fg:surface2)"
"$hostname"
"[](bg:mauve fg:overlay0)"
"$directory"
"[](fg:mauve bg:peach)"
"$c"
"$dart"
"$dotnet"
"$elixir"
"$elm"
"$erlang"
"$golang"
"$haskell"
"$haxe"
"$java"
"$julia"
"$kotlin"
"$lua"
"$nim"
"$nodejs"
"$rlang"
"$ruby"
"$rust"
"$perl"
"$php"
"$python"
"$scala"
"$swift"
"$zig"
"$package"
"$git_branch"
"[](fg:peach bg:yellow)"
"$git_status"
"[](fg:yellow bg:teal)"
"$container"
"$direnv"
"$nix_shell"
"$cmd_duration"
"$jobs"
"$shlvl"
"$status"
"$character"
];
os = {
disabled = false;
format = "$symbol";
style = "";
};
os.symbols = {
AlmaLinux = "[](fg:text bg:surface1)";
Alpine = "[](fg:blue bg:surface1)";
Amazon = "[](fg:peach bg:surface1)";
Android = "[](fg:green bg:surface1)";
Arch = "[](fg:sapphire bg:surface1)";
Artix = "[](fg:sapphire bg:surface1)";
CentOS = "[](fg:mauve bg:surface1)";
Debian = "[](fg:red bg:surface1)";
DragonFly = "[](fg:teal bg:surface1)";
EndeavourOS = "[](fg:mauve bg:surface1)";
Fedora = "[](fg:blue bg:surface1)";
FreeBSD = "[](fg:red bg:surface1)";
Garuda = "[](fg:sapphire bg:surface1)";
Gentoo = "[](fg:lavender bg:surface1)";
Illumos = "[](fg:peach bg:surface1)";
Kali = "[](fg:blue bg:surface1)";
Linux = "[](fg:yellow bg:surface1)";
Macos = "[](fg:text bg:surface1)";
Manjaro = "[](fg:green bg:surface1)";
Mint = "[](fg:teal bg:surface1)";
NixOS = "[](fg:sky bg:surface1)";
OpenBSD = "[](fg:yellow bg:surface1)";
openSUSE = "[](fg:green bg:surface1)";
Pop = "[](fg:sapphire bg:surface1)";
Raspbian = "[](fg:maroon bg:surface1)";
Redhat = "[](fg:red bg:surface1)";
RedHatEnterprise = "[](fg:red bg:surface1)";
RockyLinux = "[](fg:green bg:surface1)";
Solus = "[](fg:blue bg:surface1)";
SUSE = "[](fg:green bg:surface1)";
Ubuntu = "[](fg:peach bg:surface1)";
Unknown = "[](fg:text bg:surface1)";
Void = "[](fg:green bg:surface1)";
Windows = "[](fg:sky bg:surface1)";
};
username = {
aliases = {
"martin" = "";
"root" = "";
};
format = "[ $user]($style)";
show_always = true;
style_user = "fg:green bg:surface2";
style_root = "fg:red bg:surface2";
};
sudo = {
disabled = false;
format = "[ $symbol]($style)";
style = "fg:rosewater bg:surface2";
symbol = "";
};
hostname = {
disabled = false;
style = "bg:overlay0 fg:red";
ssh_only = false;
ssh_symbol = " ";
format = "[ $hostname]($style)[$ssh_symbol](bg:overlay0 fg:maroon)";
};
directory = {
format = "[ $path]($style)[$read_only]($read_only_style)";
home_symbol = "";
read_only = " ";
read_only_style = "bold fg:crust bg:mauve";
style = "fg:base bg:mauve";
truncation_length = 3;
truncation_symbol = "…/";
};
# Shorten long paths by text replacement. Order matters
directory.substitutions = {
"Apps" = "";
"Audio" = "";
"Crypt" = "";
"Desktop" = "";
"Development" = "";
"Documents" = "";
"Downloads" = "";
"Dropbox" = "";
"Games" = "";
"Keybase" = "";
"Music" = "";
"Pictures" = "";
"Public" = "";
"Quickemu" = "";
"Studio" = "";
"Vaults" = "";
"Videos" = "";
"Volatile" = "";
"Websites" = "";
"nix-config" = "";
"Zero" = "";
};
# Languages
c = {
format = "[ $symbol]($style)";
style = "fg:base bg:peach";
symbol = "";
};
dart = {
format = "[ $symbol]($style)";
style = "fg:base bg:peach";
symbol = "";
};
dotnet = {
format = "[ $symbol]($style)";
style = "fg:base bg:peach";
symbol = "";
};
elixir = {
format = "[ $symbol]($style)";
style = "fg:base bg:peach";
symbol = "";
};
elm = {
format = "[ $symbol]($style)";
style = "fg:base bg:peach";
symbol = "";
};
erlang = {
format = "[ $symbol]($style)";
style = "fg:base bg:peach";
symbol = "";
};
golang = {
format = "[ $symbol]($style)";
style = "fg:base bg:peach";
symbol = "";
};
haskell = {
format = "[ $symbol]($style)";
style = "fg:base bg:peach";
symbol = "";
};
haxe = {
format = "[ $symbol]($style)";
style = "fg:base bg:peach";
symbol = "";
};
java = {
format = "[ $symbol]($style)";
style = "fg:base bg:peach";
symbol = "";
};
julia = {
format = "[ $symbol]($style)";
style = "fg:base bg:peach";
symbol = "";
};
kotlin = {
format = "[ $symbol]($style)";
style = "fg:base bg:peach";
symbol = "";
};
lua = {
format = "[ $symbol]($style)";
style = "fg:base bg:peach";
symbol = "";
};
nim = {
format = "[ $symbol]($style)";
style = "fg:base bg:peach";
symbol = "";
};
nodejs = {
format = "[ $symbol]($style)";
style = "fg:base bg:peach";
symbol = "";
};
perl = {
format = "[ $symbol]($style)";
style = "fg:base bg:peach";
symbol = "";
};
php = {
format = "[ $symbol]($style)";
style = "fg:base bg:peach";
symbol = "";
};
python = {
format = "[ $symbol]($style)";
style = "fg:base bg:peach";
symbol = "";
};
rlang = {
format = "[ $symbol]($style)";
style = "fg:base bg:peach";
symbol = "";
};
ruby = {
format = "[ $symbol]($style)";
style = "fg:base bg:peach";
symbol = "";
};
rust = {
format = "[ $symbol]($style)";
style = "fg:base bg:peach";
symbol = "";
};
scala = {
format = "[ $symbol]($style)";
style = "fg:base bg:peach";
symbol = "";
};
swift = {
format = "[ $symbol]($style)";
style = "fg:base bg:peach";
symbol = "";
};
zig = {
format = "[ $symbol]($style)";
style = "fg:base bg:peach";
symbol = "";
};
package = {
format = "[ $version]($style)";
style = "fg:base bg:peach";
version_format = "$raw";
};
git_branch = {
format = "[ $symbol $branch]($style)";
style = "fg:base bg:peach";
symbol = "";
};
git_status = {
format = "[ $all_status$ahead_behind]($style)";
conflicted = " ";
untracked = " ";
stashed = " ";
modified = " ";
staged = " ";
renamed = " ";
deleted = " ";
typechanged = " ";
# $ahead_behind is just one of these
ahead = "";
behind = "";
diverged = "";
up_to_date = "";
style = "fg:base bg:yellow";
};
# "Shells"
container = {
format = "[ $symbol $name]($style)";
style = "fg:base bg:teal";
symbol = "";
};
direnv = {
disabled = false;
format = "[ $loaded]($style)";
allowed_msg = "";
not_allowed_msg = "";
denied_msg = "";
loaded_msg = "";
unloaded_msg = "";
style = "fg:base bg:teal";
symbol = "";
};
nix_shell = {
format = "[ $symbol]($style)";
style = "fg:base bg:teal";
symbol = "";
};
cmd_duration = {
format = "[ $duration]($style)";
min_time = 2500;
min_time_to_notify = 60000;
show_notifications = false;
style = "fg:base bg:teal";
};
jobs = {
format = "[ $symbol $number]($style)";
style = "fg:base bg:teal";
symbol = "";
};
shlvl = {
disabled = false;
format = "[ $symbol]($style)";
repeat = false;
style = "fg:surface1 bg:teal";
symbol = "";
threshold = 3;
};
status = {
disabled = false;
format = "$symbol";
map_symbol = true;
pipestatus = false;
style = "";
symbol = "[](fg:teal bg:pink)[ $status](fg:red bg:pink)";
success_symbol = "[](fg:teal bg:blue)";
not_executable_symbol = "[](fg:teal bg:pink)[ $common_meaning](fg:red bg:pink)";
not_found_symbol = "[](fg:teal bg:pink)[ $common_meaning](fg:red bg:pink)";
sigint_symbol = "[](fg:teal bg:pink)[ $signal_name](fg:red bg:pink)";
signal_symbol = "[](fg:teal bg:pink)[ ⚡ $signal_name](fg:red bg:pink)";
};
character = {
disabled = false;
format = "$symbol";
error_symbol = "(fg:red bg:pink)[](fg:pink) ";
success_symbol = "[](fg:blue) ";
};
};
};
tmate.enable = true;
tmux = {
aggressiveResize = true;
baseIndex = 1;
catppuccin.enable = true;
clock24 = true;
historyLimit = 50000;
enable = true;
escapeTime = 0;
extraConfig = ''
set -g @catppuccin_window_status_icon_enable "yes"
set -g @catppuccin_icon_window_last ""
set -g @catppuccin_icon_window_current ""
set -g @catppuccin_icon_window_zoom ""
set -g @catppuccin_icon_window_mark ""
set -g @catppuccin_icon_window_silent ""
set -g @catppuccin_icon_window_activity ""
set -g @catppuccin_icon_window_bell ""
set -g @catppuccin_status_background "theme"
set -g @catppuccin_window_left_separator ""
set -g @catppuccin_window_right_separator " "
set -g @catppuccin_window_middle_separator " █"
set -g @catppuccin_window_number_position "right"
set -g @catppuccin_window_default_fill "number"
set -g @catppuccin_window_default_text "#W"
set -g @catppuccin_window_current_fill "number"
set -g @catppuccin_window_current_text "#W"
set -g @catppuccin_status_modules_right "directory user host session"
set -g @catppuccin_status_left_separator " "
set -g @catppuccin_status_right_separator ""
set -g @catppuccin_status_fill "icon"
set -g @catppuccin_status_connect_separator "no"
set -g @catppuccin_directory_text "#{pane_current_path}"
# Status at the top
set -g status on
set -g status-position top
# Increase tmux messages display duration from 750ms to 4s
set -g display-time 4000
# Refresh 'status-left' and 'status-right' more often, from every 15s to 5s
set -g status-interval 5
# Focus events enabled for terminals that support them
set -g focus-events on
# | and - for splitting panes:
bind | split-window -h
bind "\\" split-window -fh
bind - split-window -v
bind _ split-window -fv
unbind '"'
unbind %
# reload config file
bind r source-file ~/.config/tmux/tmux.conf
# Fast pant-switching using Alt-arrow without prefix
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
'';
keyMode = "emacs";
mouse = true;
newSession = false;
#sensibleOnTop = true;
shortcut = "a";
terminal = "tmux-256color";
};
yazi = {
enable = true;
enableBashIntegration = true;
enableFishIntegration = true;
enableZshIntegration = true;
catppuccin.enable = true;
settings = {
manager = {
show_hidden = false;
show_symlink = true;
sort_by = "natural";
sort_dir_first = true;
sort_sensitive = false;
sort_reverse = false;
};
};