-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhome.nix
More file actions
276 lines (248 loc) · 6.33 KB
/
home.nix
File metadata and controls
276 lines (248 loc) · 6.33 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
264
265
266
267
268
269
270
271
272
273
274
275
276
{ config, pkgs, ... }:
{
home.username = "sage";
home.homeDirectory = "/home/sage";
home.stateVersion = "25.05";
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
# Packages
home.packages = with pkgs; [
kitty
feh
discord
spotify
fastfetch
neovim
xclip
maim
wl-clipboard
direnv
nodejs_22
claude-code
prismlauncher
cheese
tailscale
moonlight-qt
unzip
zip
gh
(polybar.override { i3Support = true; })
pywal
bc
nsxiv
rofi
lazygit
docker
docker-compose
ripgrep
rustup
haskellPackages.greenclip
# Dev tools
python3
gcc
cmake
];
# Neovim config (symlink only config files, not plugin data)
home.file.".config/nvim/init.lua".source = ./dotfiles/nvim/init.lua;
home.file.".config/nvim/lua" = {
source = ./dotfiles/nvim/lua;
recursive = true;
};
# Wallpapers
home.file."wallpapers" = {
source = ./dotfiles/wallpapers;
recursive = true;
};
# Git
programs.git = {
enable = true;
userName = "Will Fort";
userEmail = "willf@williamfort.click";
};
# Zsh
programs.zsh = {
enable = true;
enableCompletion = true;
autosuggestion.enable = true;
syntaxHighlighting.enable = true;
oh-my-zsh = {
enable = true;
theme = "robbyrussell";
plugins = [
"git"
"sudo"
"history"
"direnv"
];
};
initExtra = ''
# Apply pywal colors to new terminal instances
(cat ~/.cache/wal/sequences 2>/dev/null &)
fastfetch
# Copy command output to clipboard
copyclip() {
"$@" | xclip -selection clipboard
}
# Open clipboard image in feh
clipimg() {
local tmp="/tmp/clipimg_$$.png"
xclip -selection clipboard -t image/png -o > "$tmp" && feh "$tmp"
rm -f "$tmp"
}
'';
shellAliases = {
ll = "ls -la";
rebuild = "sudo nixos-rebuild switch --flake ~/nixos-config#sagetop";
config = "nvim ~/nixos-config";
tempinstall = "nix-shell -p";
};
};
# i3 config
home.file.".config/i3/config".source = ./dotfiles/i3/config;
# Polybar config
home.file.".config/polybar/config.ini".source = ./dotfiles/polybar/config.ini;
home.file.".config/polybar/launch.sh" = {
source = ./dotfiles/polybar/launch.sh;
executable = true;
};
# Scripts
home.file.".config/scripts/wallpaper.sh" = {
source = ./dotfiles/scripts/wallpaper.sh;
executable = true;
};
home.file.".config/scripts/rofi_wal.sh" = {
source = ./dotfiles/scripts/rofi_wal.sh;
executable = true;
};
home.file.".config/scripts/wallpaper_picker.sh" = {
source = ./dotfiles/scripts/wallpaper_picker.sh;
executable = true;
};
home.file.".config/scripts/scratchpad.sh" = {
source = ./dotfiles/scripts/scratchpad.sh;
executable = true;
};
home.file.".config/scripts/lock.sh" = {
source = ./dotfiles/scripts/lock.sh;
executable = true;
};
# lightChanger - syncs Tapo lights with pywal colors
home.file."lightChanger/set_light.py" = {
source = ./dotfiles/lightChanger/set_light.py;
executable = true;
};
# Pywal template for i3 colors
home.file.".config/wal/templates/colors-i3.conf" = {
source = ./dotfiles/wal/templates/colors-i3.conf;
};
# Kitty config
home.file.".config/kitty/kitty.conf".source = ./dotfiles/kitty/kitty.conf;
# Greenclip config
home.file.".config/greenclip.toml" = {
source = ./dotfiles/greenclip.toml;
force = true;
};
# Picom compositor (glx backend for blur/transparency)
services.picom = {
enable = true;
backend = "glx";
vSync = true;
shadow = true;
shadowOffsets = [ (-7) (-7) ];
shadowOpacity = 0.6;
settings = {
corner-radius = 12;
rounded-corners-exclude = [
"window_type = 'dock'"
"window_type = 'desktop'"
];
shadow-exclude = [
"window_type = 'dock'"
];
blur = {
method = "dual_kawase";
strength = 6;
};
blur-background-exclude = [
"window_type = 'dock'"
"window_type = 'desktop'"
"class_g = 'slop'"
];
unredir-if-possible = false;
};
};
# lightChanger systemd service - syncs Tapo lights with pywal colors
systemd.user.services.light-changer = {
Unit = {
Description = "Set Tapo lights to pywal colour";
After = [ "network-online.target" ];
Wants = [ "network-online.target" ];
};
Service = {
Type = "oneshot";
ExecStartPre = "/usr/bin/env sleep 0.5";
ExecStart = "${config.home.homeDirectory}/lightChanger/set_light.py";
RemainAfterExit = false;
};
Install = {
WantedBy = [ "default.target" ];
};
};
systemd.user.paths.light-changer = {
Unit = {
Description = "Watch pywal colors.json for changes";
};
Path = {
PathModified = "${config.home.homeDirectory}/.cache/wal/colors.json";
};
Install = {
WantedBy = [ "default.target" ];
};
};
# Tmux color updater systemd service - reloads tmux when pywal colors change
systemd.user.services.tmux-colors = {
Unit = {
Description = "Reload tmux colors from pywal";
};
Service = {
Type = "oneshot";
ExecStart = "${pkgs.tmux}/bin/tmux source-file ${config.home.homeDirectory}/.tmux.conf";
RemainAfterExit = false;
};
};
systemd.user.paths.tmux-colors = {
Unit = {
Description = "Watch pywal tmux colors for changes";
};
Path = {
PathModified = "${config.home.homeDirectory}/.cache/wal/colors-tmux.conf";
};
Install = {
WantedBy = [ "default.target" ];
};
};
# Neovim color updater systemd service - reloads nvim when pywal colors change
systemd.user.services.nvim-colors = {
Unit = {
Description = "Reload neovim colors from pywal";
};
Service = {
Type = "oneshot";
ExecStart = "${pkgs.bash}/bin/bash -c '${pkgs.procps}/bin/pkill -USR1 nvim'";
RemainAfterExit = false;
};
};
systemd.user.paths.nvim-colors = {
Unit = {
Description = "Watch pywal neovim colors for changes";
};
Path = {
PathModified = "${config.home.homeDirectory}/.cache/wal/colors-wal.vim";
};
Install = {
WantedBy = [ "default.target" ];
};
};
# Let Home Manager manage itself
programs.home-manager.enable = true;
}