-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathhome.nix
More file actions
263 lines (237 loc) · 7.79 KB
/
home.nix
File metadata and controls
263 lines (237 loc) · 7.79 KB
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
{
config,
pkgs,
osConfig,
...
}:
let
dotfilesDir = "${config.home.homeDirectory}/dotfiles";
mkDotfilesSymlink = true;
mkDotfile =
{
mkSymlink,
path,
absPath,
}:
if mkSymlink then config.lib.file.mkOutOfStoreSymlink absPath else path;
in
{
# Home Manager needs a bit of information about you and the paths it should
# manage.
home.username = "hwtb";
home.homeDirectory = "/home/hwtb";
# 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 = "25.05"; # Please read the comment before changing.
# The home.packages option allows you to install Nix packages into your
# environment.
home.packages = [
# # Adds the 'hello' command to your environment. It prints a friendly
# # "Hello, world!" when run.
# pkgs.hello
# # 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'.
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;
".config/hypr".source = mkDotfile {
mkSymlink = mkDotfilesSymlink;
path = ./hypr/.config/hypr;
absPath = "${dotfilesDir}/hypr/.config/hypr";
};
".config/waybar".source = mkDotfile {
mkSymlink = mkDotfilesSymlink;
path = ./waybar/.config/waybar;
absPath = "${dotfilesDir}/waybar/.config/waybar";
};
".config/dunst".source = mkDotfile {
mkSymlink = mkDotfilesSymlink;
path = ./dunst/.config/dunst;
absPath = "${dotfilesDir}/dunst/.config/dunst";
};
".config/walker".source = mkDotfile {
mkSymlink = mkDotfilesSymlink;
path = ./walker/.config/walker;
absPath = "${dotfilesDir}/walker/.config/walker";
};
".config/i3".source = mkDotfile {
mkSymlink = mkDotfilesSymlink;
path = ./i3/.config/i3;
absPath = "${dotfilesDir}/i3/.config/i3";
};
".config/polybar".source = mkDotfile {
mkSymlink = mkDotfilesSymlink;
path = ./polybar/.config/polybar;
absPath = "${dotfilesDir}/polybar/.config/polybar";
};
".config/rofi".source = mkDotfile {
mkSymlink = mkDotfilesSymlink;
path = ./rofi/.config/rofi;
absPath = "${dotfilesDir}/rofi/.config/rofi";
};
".config/picom".source = mkDotfile {
mkSymlink = mkDotfilesSymlink;
path = ./picom/.config/picom;
absPath = "${dotfilesDir}/picom/.config/picom";
};
".config/alacritty".source = mkDotfile {
mkSymlink = mkDotfilesSymlink;
path = ./alacritty/.config/alacritty;
absPath = "${dotfilesDir}/alacritty/.config/alacritty";
};
".config/zellij".source = mkDotfile {
mkSymlink = mkDotfilesSymlink;
path = ./zellij/.config/zellij;
absPath = "${dotfilesDir}/zellij/.config/zellij";
};
".config/helix".source = mkDotfile {
mkSymlink = mkDotfilesSymlink;
path = ./helix/.config/helix;
absPath = "${dotfilesDir}/helix/.config/helix";
};
".xinitrc".text = ''
exec i3
'';
# # You can also set the file content immediately.
# ".gradle/gradle.properties".text = ''
# org.gradle.console=verbose
# org.gradle.daemon.idletimeout=3600000
# '';
};
# 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/hwtb/etc/profile.d/hm-session-vars.sh
#
home.sessionVariables = {
# EDITOR = "emacs";
HELIX_RUNTIME = "$HOME/programs/helix/runtime";
};
home.sessionPath = [ "$HOME/programs/helix/target/release" ];
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
programs.fish = {
enable = true;
shellAbbrs = {
ls = "eza";
l = "eza -al";
cd = "z";
cdi = "zi";
cat = "bat";
hxf = ''hx $(fzf --multi --preview="bat --color=always {}")'';
fzfp = ''fzf --multi --preview="bat --color=always {}"'';
gs = "git status";
gd = "git -c diff.external=difft diff";
gds = "git -c diff.external=difft diff --staged";
ga = "git add";
gc = "git commit -m";
gr = "git restore";
grs = "git restore --staged";
gps = "git push";
gpl = "git pull";
};
interactiveShellInit = ''
set -gx ANDROID_HOME "${osConfig.android.sdkPath}";
set -gx ANDROID_NDK_ROOT "${osConfig.android.sdkPath}/ndk-bundle";
set -gx GRADLE_OPTS "-Dorg.gradle.project.android.aapt2FromMavenOverride=${osConfig.android.sdkPath}/build-tools/${osConfig.android.buildToolVersion}/aapt2";
set fish_greeting # Disable greeting
# Catppuccin Mocha
set fish_color_normal cdd6f4
set fish_color_command 89b4fa
set fish_color_param f2cdcd
set fish_color_keyword f38ba8
set fish_color_quote a6e3a1
set fish_color_redirection f5c2e7
set fish_color_end fab387
set fish_color_comment 7f849c
set fish_color_error f38ba8
set fish_color_gray 6c7086
set fish_color_selection --background=313244
set fish_color_search_match --background=313244
set fish_color_option a6e3a1
set fish_color_operator f5c2e7
set fish_color_escape eba0ac
set fish_color_autosuggestion 6c7086
set fish_color_cancel f38ba8
set fish_color_cwd f9e2af
set fish_color_user 94e2d5
set fish_color_host 89b4fa
set fish_color_host_remote a6e3a1
set fish_color_status f38ba8
set fish_pager_color_progress 6c7086
set fish_pager_color_prefix f5c2e7
set fish_pager_color_completion cdd6f4
set fish_pager_color_description 6c7086
'';
};
programs.git = {
enable = true;
settings.init.defaultBranch = "main";
};
services.udiskie = {
enable = true;
};
gtk = {
enable = true;
theme = {
name = "Adwaita";
package = pkgs.gnome-themes-extra;
};
iconTheme = {
name = "Papirus";
package = pkgs.papirus-icon-theme;
};
cursorTheme = {
name = "Bibata-Modern-Classic";
package = pkgs.bibata-cursors;
};
gtk3.extraConfig.gtk-application-prefer-dark-theme = 1;
};
dconf = {
enable = true;
settings = {
"org/gnome/desktop/interface" = {
color-scheme = "prefer-dark";
gtk-theme = "Adwaita";
icon-theme = "Papirus";
};
};
};
home.pointerCursor = {
gtk.enable = true;
x11.enable = true;
package = pkgs.bibata-cursors;
name = "Bibata-Modern-Classic";
size = 16;
};
}