-
Notifications
You must be signed in to change notification settings - Fork 0
/
home.nix
236 lines (214 loc) · 5.73 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
{config, pkgs, ecsls, system, ...}: {
# TODO please change the username & home directory to your own
home.username = "ncr";
home.homeDirectory = "/home/ncr";
# link the configuration file in current directory to the specified location in home directory
# home.file.".config/i3/wallpaper.jpg".source = ./wallpaper.jpg;
# link all files in `./scripts` to `~/.config/i3/scripts`
# home.file.".config/i3/scripts" = {
# source = ./scripts;
# recursive = true; # link recursively
# executable = true; # make all files executable
# };
# encode the file content in nix configuration file directly
# home.file.".xxx".text = ''
# xxx
# '';
# set cursor size and dpi for 4k monitor
xresources.properties = {
"Xcursor.size" = 1230;
"Xft.dpi" = 100;
};
# Packages that should be installed to the user profile.
home.packages = with pkgs; [
# PACKAGES !!!!!
# archives
zip
xz
unzip
p7zip
eza
pavucontrol
qbittorrent
python3
# utils
ripgrep # recursively searches directories for a regex pattern
jq # A lightweight and flexible command-line JSON processor
yq-go # yaml processer https://github.com/mikefarah/yq
eza # A modern replacement for ‘ls’
fzf # A command-line fuzzy finder
helix
# networking tools
mtr # A network diagnostic tool
iperf3
dnsutils # `dig` + `nslookup`
ldns # replacement of `dig`, it provide the command `drill`
aria2 # A lightweight multi-protocol & multi-source command-line download utility
socat # replacement of openbsd-netcat
nmap # A utility for network discovery and security auditing
ipcalc # it is a calculator for the IPv4/v6 addresses
# misc
neofetch
gimp
krita
hyfetch
betterlockscreen
cowsay
file
which
tree
gnused
gnutar
gawk
zstd
gnupg
clang
ponysay
gnumake
libgcc
alacritty-theme
chromium
blueberry
vector
armadillo
prismlauncher
jdk8
poppler_utils
flameshot
libreoffice
protonvpn-gui
# nix related
#
# it provides the command `nom` works just like `nix`
# with more details log output
nix-output-monitor
# productivity
hugo # static site generator
glow # markdown previewer in terminal
btop # replacement of htop/nmon
iotop # io monitoring
iftop # network monitoring
# system call monitoring
strace # system call monitoring
ltrace # library call monitoring
lsof # list open files
sl
# system tools
sysstat
lm_sensors # for `sensors` command
ethtool
pciutils # lspci
usbutils # lsusb
tmux
];
# users/ncr/home.nix
# ...
gtk = {
enable = true;
iconTheme = {
name = "Papirus-Dark";
package = pkgs.papirus-icon-theme;
};
theme = {
name = "Catppuccin-Macchiato-Compact-Pink-Dark";
package = pkgs.catppuccin-gtk.override {
accents = ["pink"];
size = "compact";
tweaks = ["rimless" "black"];
variant = "macchiato";
};
};
};
xdg.configFile = {
"gtk-4.0/assets".source = "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}/gtk-4.0/assets";
"gtk-4.0/gtk.css".source = "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}/gtk-4.0/gtk.css";
"gtk-4.0/gtk-dark.css".source = "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}/gtk-4.0/gtk-dark.css";
};
dconf.settings = {
# Prefer Dark Theme
"org/gnome/desktop/interface" = {
color-scheme = "prefer-dark";
};
};
home.sessionVariables.GTK_THEME = "Catppuccin-Macchiato-Compact-Pink-Dark";
# ...
home.file = {
nvim_conf = {
source = ./lua;
target = ".config/nvim/lua";
recursive = true;
};
};
programs.neovim = {
enable = true;
extraConfig = (builtins.readFile ./.vimrc);
plugins = [ pkgs.vimPlugins.lazy-nvim ];
extraPackages = with pkgs; let
ecsls-pkg = ecsls.packages.${system}.default;
in
[
nil
lua-language-server
nodePackages.pyright
clang-tools
nodejs
xclip
ecsls-pkg
telescope
];
};
programs.direnv = {
enable = true;
nix-direnv = {
enable = true;
};
};
programs.git = {
enable = true;
userName = "NCR";
userEmail = "[email protected]";
};
# starship - an customizable prompt for any shell
programs.alacritty = {
enable = true;
settings = {
import = [
"${pkgs.alacritty-theme}/catppuccin-mocha.toml" ];
};
};
programs.starship = {
enable = true;
# custom settings
settings = {
add_newline = false;
aws.disabled = true;
gcloud.disabled = true;
line_break.disabled = true;
};
};
programs.bash = {
enable = true;
enableCompletion = true;
# TODO add your custom bashrc here
bashrcExtra = ''
export PATH="$PATH:$HOME/bin:$HOME/.local/bin:$HOME/go/bin"
'';
# set some aliases, feel free to add more or remove some
shellAliases = {
k = "kubectl";
urldecode = "python3 -c 'import sys, urllib.parse as ul; print(ul.unquote_plus(sys.stdin.read()))'";
urlencode = "python3 -c 'import sys, urllib.parse as ul; print(ul.quote_plus(sys.stdin.read()))'";
};
};
# 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 can update home Manager without changing this value. See
# the home Manager release notes for a list of state version
# changes in each release.
home.stateVersion = "24.05";
# Let home Manager install and manage itself.
programs.home-manager.enable = true;
}