-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
home.nix
786 lines (614 loc) · 14.6 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
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
{
config,
pkgs,
overlays,
inputs,
...
}:
let
system = "x86_64-linux";
nurpkgs = inputs.nur-packages.legacyPackages.${system};
wallpapers = builtins.fetchTarball {
url = "https://github.com/zhichaoh/catppuccin-wallpapers/archive/refs/heads/main.zip";
sha256 = "sha256:0rd6hfd88bsprjg68saxxlgf2c2lv1ldyr6a8i7m4lgg6nahbrw7";
};
wallpaper = "${wallpapers}/misc/cat-sound.png";
in rec {
nixpkgs.config = {
allowUnfree = true;
permittedInsecurePackages = [
"electron-29.4.6"
];
android_sdk.accept_license = true;
};
# Home Manager needs a bit of information about you and the paths it should
# manage.
home.username = "coma";
home.homeDirectory = "/home/coma";
# This value determines the Home Manager release that your configuration is
# compatible with. This helps avoid breakage when a new Home Manager release
# introduces backwards incompatible changes.
#
# You should not change this value, even if you update Home Manager. If you do
# want to update the value, then make sure to first check the Home Manager
# release notes.
home.stateVersion = "24.05"; # Please read the comment before changing.
# The home.packages option allows you to install Nix packages into your
# environment.
home.packages = with pkgs; [
# # Adds the 'hello' command to your environment. It prints a friendly
# # "Hello, world!" when run.
# pkgs.hello
# Knowledge tool for terminal
nb
w3m
# theme
catppuccin
# Nix
nixVersions.nix_2_23
# ========== NIXGL ==========
# nixgl.nixGLIntel
# ========== Audio ==========
sonic-pi
qpwgraph
# ========== TERMINAL ==========
wezterm
alacritty
kitty
# ========== EDITOR & TOOLS ==========
arduino
# TODO: change to vim-overlay
vim-full
emacs30-pgtk
felix
micro
neovim
jetbrains.idea-community
# visual-studio-code-bin
# inputs.lem-editor.packages.x86_64-linux.lem-ncurses
metals
meson
leiningen
tig
just
# ========== OTHER TOOLS ==========
nix-search-cli
zellij
# textimg
# textql-git
nak
vim-startuptime
cachix
ghq
cava
lsd
bat
jnv
jq
dasel
lazydocker
lazygit
git
delta
jwt-cli
slack
teams-for-linux
discord
beeper
# Teams for linux is depends to Electron-29 but EOL.
# teams-for-linux
teip
tokei
tree
unar
k6
# esp32
easyeffects
espup
espflash
esptool
cargo-espmonitor
mkspiffs-presets.esp-idf
# ========== SHELL ==========
nushell
# ========== BROWSER ==========
# firefox
# google-chrome
# ========== SECURITY TOOLS ==========
keybase
lssecret
pinentry-curses
(pkgs.lib.hiPrio pinentry-emacs)
# ========== LANGUAGE SERVER ==========
lua-language-server
vim-language-server
typescript-language-server
efm-langserver
# ========== RUNTIME & COMPILER ==========
babashka
# ref: https://cons.io/
gerbil
# gambit
erlang_27
rebar3
deno
nodejs_22
bun
pnpm
gleam
# Common Lisp
sbcl
roswell
sbclPackages.qlot-cli
ruby
# roswell
# swift ==> Flake
# ========== FONTS ==========
noto-fonts
noto-fonts-cjk-sans
# ttf-udev-gothic
# ========== Writing ==========
textlint
textlint-rule-preset-ja-technical-writing
# ========== UTILS ==========
nix-prefetch-scripts
# ========== FROM PKGLIST ==========
acpi
acpid
act
# apparmor
libapparmor
# arduino-cli
# arduino-ide-bin
asar
at
autoconf-archive
autotiling
avahi
# b43-fwcutter
b43FirmwareCutter
babashka
# base
# base-devel
bison
bitwarden-cli
bluez
# bluez-utils
bluez-tools
# boost
bottom
btrfs-progs
bzip2
cava
ccache
cliphist
cloc
conky
coreutils
cpio
# cpupower
linuxKernel.packages.linux_zen.cpupower
# cronie
cryptsetup
deno
# device-mapper
# dhclient
# dhcpcd
# diffutils
# discord_arch_electron
dmraid
dnsmasq
docker
docker-compose
dosfstools
# downgrade
doxygen
e2fsprogs
efibootmgr
# era
# esp-idf
# esptool
exfatprogs
f2fs-tools
fastfetch
# fcitx5
# fcitx5-configtool
# fcitx5-gtk
# fcitx5-skk
fd
ffmpeg
ffmpegthumbnailer
file-roller
flashfocus
font-manager
fzf
gammastep
# gcc-fortran
gfortran9
gd
github-cli
glava
glibcLocales
glow
gnome-epub-thumbnailer
gnome-keyring
go
gomi
# greetd
# greetd-tuigreet
greetd.greetd
greetd.tuigreet
# grub
# grub-btrfs
grim
# gtk3-nocsd
gvfs
# gvfs-mtp
helix
himalaya
htop
httpie
# immersed
imv
inetutils
# intel-ucode
jfsutils
# kitty
# kvantum
less
# lib32-glu
# lib32-libva-vdpau-driver
# lib32-mesa-vdpau
# lib32-vulkan-intel
# lib32-vulkan-radeon
# libcava
# libfishsound
# liboggz
# libsixel
# libva-mesa-driver
# libva-vdpau-driver
lightdm
# linux61
logrotate
luarocks
lvm2
ly
gnumake
man-db
man-pages
mdadm
mediainfo
# memtest86plus
# memtest86-efi
# mesa-vdpau
# mhwd
# mhwd-db
# mkinitcpio-openswap
# nfs-utils
mplayer
# multilib-devel
# ncurses5-compat-libs
# network-manager-applet
# networkmanager
# nss-mdns
# ntfs-3g
oh-my-zsh
# openssh-askpass
opusfile
os-prober
p7zip
pass
patch
pavucontrol
perl
playerctl
polkit_gnome
# postgresql-libs
poweralertd
pulsemixer
# python-breathe
# python-eventlet
# python-joblib
# python-pyserial
# python-recommonmark
# python-sphinx-alabaster-theme
# pywal-16-colors
# qemu-base
# qemu-desktop
# qemu-system-riscv
# qt5-wayland
# qt5ct
# qt6-multimedia
# qt6-tools
# qt6-wayland
# qt6ct
ranger
# rcm
re2c
redis
reiserfsprogs
ripgrep
# riscv-gnu-toolchain-bin
rlwrap
rofi-power-menu
rsync
samurai
sd
shotcut
siege
slurp
sof-firmware
spectre-meltdown-checker
spotify
# spotify-tui
squashfsTools
starship
# sudo
# super_unko-git
# swaycwd
# swaylock-effects
# swaync
# sworkstyle
swww
sysfsutils
systemd
# taglib1
# teams-for-linux
texinfo
xfce.thunar
# timeshift-autosnap-manjaro
usbutils
uucp
# v4l2loopback-dkms
vhs
vlc
# vulkan-intel
# vulkan-radeon
way-displays
waypaper
wdisplays
wev
wf-recorder
wget
which
wireless-regdb
wl-clipboard
wlay
wlsunset
wofi
wpa_supplicant
# ========== OTHER TOOLS ==========
wakatime
# hyprland
# hyprlock
hyperfine
hyprpaper
hyprshade
# wqy-microhei
# wxwidgets-gtk3
# xclip
xdg-desktop-portal-wlr
xdg-user-dirs
# xf86-video-amdgpu
# xf86-video-ati
# xf86-video-intel
# xf86-video-nouveau
# xfsprogs
# xorg-xwayland
xsv
yq
# zeit
zeitgeist
# ==================================
# # It is sometimes useful to fine-tune packages, for example, by applying
# # overrides. You can do that directly here, just don't forget the
# # parentheses. Maybe you want to install Nerd Fonts with a limited number of
# # fonts?
# (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; })
# # You can also create simple shell scripts directly inside your
# # configuration. For example, this adds a command 'my-hello' to your
# # environment:
# (pkgs.writeShellScriptBin "my-hello" ''
# echo "Hello, ${config.home.username}!"
# '')
];
# Home Manager is pretty good at managing dotfiles. The primary way to manage
# plain files is through 'home.file'.
# # Building this configuration will create a copy of 'dotfiles/screenrc' in
# # the Nix store. Activating the configuration will then make '~/.screenrc' a
# # symlink to the Nix store copy.
# ".screenrc".source = dotfiles/screenrc;
# # You can also set the file content immediately.
# ".gradle/gradle.properties".text = ''
# org.gradle.console=verbose
# org.gradle.daemon.idletimeout=3600000
# '';
home.file =
let
symlink = config.lib.file.mkOutOfStoreSymlink;
dotfiles = /${home.homeDirectory}/.ghq/github.com/Comamoca/dotfiles;
xdgConfigHome = /${home.homeDirectory}/.config;
homeBin = /${home.homeDirectory}/.bin;
in
{
# scripts
".bin/scripts/ime" = {
source = (symlink /${dotfiles}/bin/scripts/ime);
recursive = true;
};
".bin/scripts/mit" = {
source = (symlink /${dotfiles}/bin/scripts/mit);
recursive = true;
};
".bin/scripts/zlib" = {
source = (symlink /${dotfiles}/bin/scripts/zlib);
recursive = true;
};
".bin/scripts/shift" = {
source = (symlink /${dotfiles}/bin/scripts/shift);
recursive = true;
};
# Vim configs.
".vimrc".source = (symlink /${dotfiles}/vimrc);
".vim" = {
source = (symlink /${dotfiles}/vim);
recursive = true;
};
# # ========== SKK ==========
# skk-dicts
".skk-dict/SKK-JISYO.L".source = "${pkgs.skkDictionaries.l}/share/skk/SKK-JISYO.L";
".skk-dict/[email protected]".source = "${nurpkgs.skk-jisyo-imasparql}/share/[email protected]";
".spell-dict/programming-english-dict".source = "${nurpkgs.programming-english}/share/dict/programming-english-dict";
".spell-dict/dict.txt".source = ./word_dicts/dict.txt;
# TODO: 後で消す
# ".config/" = {
# source = (symlink /${dotfiles}/config);
# recursive = true;
# };
".config/home-manager" = {
source = (symlink /${dotfiles}/config/home-manager);
recursive = true;
};
# ".config/hypr" = {
# source = (symlink /${dotfiles}/config/hypr);
# recursive = true;
# };
".config/swaylock" = {
source = (symlink /${dotfiles}/config/swaylock);
recursive = true;
};
".config/cava" = {
source = (symlink /${dotfiles}/config/cava);
recursive = true;
};
".config/conky" = {
source = (symlink /${dotfiles}/config/conky);
recursive = true;
};
# ".config/fish" = {
# source = (symlink /${dotfiles}/config/fish);
# recursive = true;
# };
".config/i3" = {
source = (symlink /${dotfiles}/config/i3);
recursive = true;
};
".config/ime" = {
source = (symlink /${dotfiles}/config/ime);
recursive = true;
};
".config/kitty" = {
source = (symlink /${dotfiles}/config/kitty);
recursive = true;
};
# ".config/kitty/kitty.conf" = {
# source = pkgs.substituteAll {
# name = "kitty_themes";
# kitty_themes = "${inputs.catppuccin-kitty}/themes";
# src = /${dotfiles}/config/kitty/kitty.conf;
# };
# };
".config/lazygit" = {
source = (symlink /${dotfiles}/config/lazygit);
recursive = true;
};
".config/libskk" = {
source = (symlink /${dotfiles}/config/libskk);
recursive = true;
};
".config/nvim" = {
source = (symlink /${dotfiles}/config/nvim);
recursive = true;
};
".config/sway" = {
source = (symlink /${dotfiles}/config/sway);
recursive = true;
};
".config/waybar" = {
source = (symlink /${dotfiles}/config/waybar);
recursive = true;
};
".config/wezterm" = {
source = (symlink /${dotfiles}/config/wezterm);
recursive = true;
};
".config/rofi" = {
source = (symlink /${dotfiles}/config/rofi);
# source = ;
recursive = true;
};
".config/bat" = {
source = (symlink /${dotfiles}/config/bat);
recursive = true;
};
".config/swaync" = {
source = (symlink /${dotfiles}/config/swaync);
recursive = true;
};
".czrc".source = (symlink /${dotfiles}/czrc);
".nirc".source = (symlink /${dotfiles}/nirc);
".zshrc".source = (symlink /${dotfiles}/zshrc);
# TODO: `~/.config/vsnip`に移動する。
".vsnip".source = (symlink /${dotfiles}/vsnip);
".gitconfig".source = (symlink /${dotfiles}/gitconfig);
".Xmodmap".source = (symlink /${dotfiles}/Xmodmap);
".tmux.conf".source = (symlink /${dotfiles}/tmux.conf);
".emacs.d" = {
source = (symlink /${dotfiles}/emacs.d);
recursive = true;
};
".skk".source = (symlink /${dotfiles}/ddskk-config.el);
};
# Home Manager can also manage your environment variables through
# 'home.sessionVariables'. These will be explicitly sourced when using a
# shell provided by Home Manager. If you don't want to manage your shell
# through Home Manager then you have to manually source 'hm-session-vars.sh'
# located at either
#
# ~/.nix-profile/etc/profile.d/hm-session-vars.sh
#
# or
#
# ~/.local/state/nix/profiles/profile/etc/profile.d/hm-session-vars.sh
#
# or
#
# /etc/profiles/per-user/coma/etc/profile.d/hm-session-vars.sh
home.sessionVariables = {
# EDITOR = "nvim";
XDG_CONFIG_HOME = "${home.homeDirectory}/.config";
};
# programs.neovim.package = pkgs.neovim;
# programs.neovim.enable = true;
# neovim-nightly
# programs.neovim = {
# enable = true;
# package = inputs.programs.neovim.packages.${pkgs.system}.default;
# };
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
wayland.windowManager.hyprland.enable = true;
wayland.windowManager.hyprland.settings = import ./hyprland.nix { inherit pkgs wallpaper home config; };
wayland.windowManager.hyprland.catppuccin.enable = true;
programs = {
direnv = {
enable = true;
nix-direnv.enable = true;
};
fish = import ./fish.nix { inherit pkgs; };
hyprlock.settings = import ./hyprlock.nix { inherit wallpaper; };
hyprlock.enable = true;
};
programs.foot = {
enable = true;
catppuccin.enable = true;
settings = {
main = {
term = "xterm-256color";
font = "UDEV Gothic NFLG:size=12.5";
dpi-aware = "yes";
};
};
};
# programs.lem-editor.enable = true
}