me like nix
1{ pkgs, inputs, ... }:
2
3{
4 # Import the home-manager modules you want to use
5 imports = [
6 inputs.catppuccin.homeModules.catppuccin
7 inputs.niri.homeModules.niri
8 inputs.zen-browser.homeModules.beta
9 ];
10
11 # Niri window manager settings, now controlled by the imported module
12 programs.niri = {
13 enable = true;
14 settings = {
15 window-rules = [
16 {
17 geometry-corner-radius = {
18 top-left = 12.0;
19 top-right = 12.0;
20 bottom-left = 12.0;
21 bottom-right = 12.0;
22 };
23 clip-to-geometry = true;
24 }
25 ];
26 layout = {
27 struts = {
28 top = 0;
29 bottom = 0;
30 };
31 };
32 gestures = {
33 hot-corners = {
34 enable = false;
35 };
36 };
37 binds = {
38 "Mod+d".action.spawn = "fuzzel";
39 "Mod+e".action.spawn = "bemoji";
40 "Mod+n".action.spawn = "networkmanager_dmenu";
41 "Mod+a".action.spawn = "alacritty";
42 "Mod+h".action = {
43 focus-column-left = { };
44 };
45 "Mod+j".action = {
46 focus-workspace-down = { };
47 };
48 "Mod+k".action = {
49 focus-workspace-up = { };
50 };
51 "Mod+l".action = {
52 focus-column-right = { };
53 };
54 "Mod+Shift+h".action = {
55 move-column-left = { };
56 };
57 "Mod+Shift+j".action = {
58 move-window-down-or-to-workspace-down = { };
59 };
60 "Mod+Shift+k".action = {
61 move-window-up-or-to-workspace-up = { };
62 };
63 "Mod+Shift+l".action = {
64 move-column-right = { };
65 };
66 "Mod+Down".action = {
67 move-workspace-down = { };
68 };
69 "Mod+Up".action = {
70 move-workspace-up = { };
71 };
72 "Mod+p".action = {
73 show-hotkey-overlay = { };
74 };
75 "Mod+o".action = {
76 toggle-overview = { };
77 };
78 "Mod+q".action = {
79 close-window = { };
80 };
81 "Mod+s".action = {
82 screenshot = {
83 show-pointer = true;
84 };
85 };
86 "Mod+1".action = {
87 set-column-width = "100%";
88 };
89 "Mod+2".action = {
90 set-column-width = "50%";
91 };
92 "XF86MonBrightnessDown".action.spawn = [
93 "brightnessctl"
94 "set"
95 "5%-"
96 ];
97 "XF86MonBrightnessUp".action.spawn = [
98 "brightnessctl"
99 "set"
100 "+5%"
101 ];
102 };
103 outputs = {
104 "DP-1" = {
105 scale = 2.0;
106 };
107 "DP-7" = {
108 scale = 2.0;
109 };
110 };
111 spawn-at-startup = [
112 { command = [ "xwayland-satellite" ]; }
113 { command = [ "swww-daemon" ]; }
114 { command = [ "mako" ]; }
115 { command = [ "waybar" ]; }
116 { command = [ "wl-paste --watch cliphist store" ]; }
117 ];
118 environment = {
119 DISPLAY = ":0";
120 };
121 };
122 };
123
124 # Allow unfree packages
125 nixpkgs.config.allowUnfree = true;
126
127 nixpkgs.config.permittedInsecurePackages = [
128 "libsoup-2.74.3"
129 ];
130
131 programs.waybar = {
132 enable = true;
133 settings = {
134 mainBar = {
135 height = 8;
136 spacing = 0;
137
138 modules-left = [
139 "custom/media"
140 ];
141
142 modules-center = [
143 "clock"
144 ];
145
146 modules-right = [
147 "mpd"
148 "pulseaudio"
149 "network"
150 "power-profiles-daemon"
151 "cpu"
152 "memory"
153 "temperature"
154 "backlight"
155 "sway/language"
156 "battery"
157 "battery#bat2"
158 "custom/power"
159 ];
160
161 "keyboard-state" = {
162 numlock = true;
163 capslock = true;
164 format = "{name} {icon}";
165 format-icons = {
166 locked = " ";
167 unlocked = " ";
168 };
169 };
170
171 mpd = {
172 format = "{stateIcon} {consumeIcon}{randomIcon}{repeatIcon}{singleIcon}{artist} - {album} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S}) ⸨{songPosition}|{queueLength}⸩ {volume}% ";
173 format-disconnected = "Disconnected ";
174 format-stopped = "{consumeIcon}{randomIcon}{repeatIcon}{singleIcon}Stopped ";
175 unknown-tag = "N/A";
176 interval = 5;
177 consume-icons = {
178 on = " ";
179 };
180 random-icons = {
181 off = "<span color=\"#f53c3c\"></span> ";
182 on = " ";
183 };
184 repeat-icons = {
185 on = " ";
186 };
187 single-icons = {
188 on = "1 ";
189 };
190 state-icons = {
191 paused = "";
192 playing = "";
193 };
194 tooltip-format = "MPD (connected)";
195 tooltip-format-disconnected = "MPD (disconnected)";
196 };
197
198 idle_inhibitor = {
199 format = "{icon}";
200 format-icons = {
201 activated = " ";
202 deactivated = " ";
203 };
204 };
205
206 tray = {
207 spacing = 10;
208 };
209
210 clock = {
211 format = "{:%d-%m-%Y %H:%M}";
212 tooltip-format = "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>";
213 format-alt = "{:%Y-%m-%d %H:%M:%S}";
214 };
215
216 cpu = {
217 format = "{usage}% ";
218 tooltip = false;
219 };
220
221 memory = {
222 format = "{}% ";
223 };
224
225 temperature = {
226 critical-threshold = 80;
227 format = "{temperatureC}°C {icon}";
228 format-icons = [
229 ""
230 ""
231 ""
232 ];
233 };
234
235 backlight = {
236 format = "{percent}% {icon}";
237 format-icons = [
238 ""
239 ""
240 ""
241 ""
242 ""
243 ""
244 ""
245 ""
246 ""
247 ];
248 };
249
250 battery = {
251 states = {
252 warning = 30;
253 critical = 15;
254 };
255 format = "{capacity}% {icon}";
256 format-full = "{capacity}% {icon}";
257 format-charging = "{capacity}% ";
258 format-plugged = "{capacity}% ";
259 format-alt = "{time} {icon}";
260 format-icons = [
261 ""
262 ""
263 ""
264 ""
265 ""
266 ];
267 };
268
269 "battery#bat2" = {
270 bat = "BAT2";
271 };
272
273 "power-profiles-daemon" = {
274 format = "{icon}";
275 tooltip-format = "Power profile: {profile}\nDriver: {driver}";
276 tooltip = true;
277 format-icons = {
278 default = "";
279 performance = "";
280 balanced = " ";
281 power-saver = " ";
282 };
283 };
284
285 network = {
286 format-wifi = "{essid} ({signalStrength}%) ";
287 format-ethernet = "{ipaddr}/{cidr} ";
288 tooltip-format = "{ifname} via {gwaddr} ";
289 format-linked = "{ifname} (No IP) ";
290 format-disconnected = "Disconnected ⚠";
291 format-alt = "{ifname}: {ipaddr}/{cidr}";
292 };
293
294 pulseaudio = {
295 format = "{volume}% {icon} {format_source}";
296 format-bluetooth = "{volume}% {icon} {format_source}";
297 format-bluetooth-muted = " {icon} {format_source}";
298 format-muted = " {format_source}";
299 format-source = "{volume}% ";
300 format-source-muted = " ";
301 format-icons = {
302 headphone = "";
303 hands-free = "";
304 headset = "";
305 phone = "";
306 portable = "";
307 car = "";
308 default = [
309 ""
310 " "
311 " "
312 ];
313 };
314 on-click = "pavucontrol";
315 };
316
317 "custom/media" = {
318 format = "{icon} {text}";
319 return-type = "json";
320 max-length = 40;
321 format-icons = {
322 spotify = " ";
323 default = "🎜 ";
324 };
325 escape = true;
326 exec = "$HOME/.config/waybar/mediaplayer.py 2> /dev/null";
327 };
328
329 "custom/power" = {
330 format = "⏻ ";
331 tooltip = false;
332 menu = "on-click";
333 menu-file = "${./waybar/power_menu.xml}";
334 menu-actions = {
335 shutdown = "shutdown";
336 reboot = "reboot";
337 suspend = "systemctl suspend";
338 hibernate = "systemctl hibernate";
339 };
340 };
341 };
342 };
343 style = builtins.readFile ./waybar/style.css;
344 };
345
346 programs.ssh = {
347 enable = true;
348 extraConfig = ''
349 Host *
350 IdentityAgent ~/.1password/agent.sock
351 '';
352 };
353
354 programs.awscli = {
355 enable = true;
356 settings = {
357 "default" = {
358 region = "us-east-2";
359 };
360 };
361 };
362
363 # All your user-specific packages
364 home.packages = with pkgs; [
365 helix
366 git
367 jujutsu # jj-cli
368 htop
369 zellij # terminal multiplexer
370 alacritty
371 fuzzel # Application launcher
372 bemoji # emoji picker
373 networkmanager_dmenu # network picker for fuzzel
374 waybar # Status bar (highly recommended)
375 mako # Notification daemon
376 swww # For setting wallpapers
377 cliphist # Clipboard history manager
378 pavucontrol # GUI for PulseAudio/PipeWire volume control
379 fd
380 ripgrep
381 yazi # tui file browser
382 gh # github cli
383 signal-desktop
384 xwayland-satellite # for running x11 apps
385 nixfmt-rfc-style # nix formatter
386 nil # nix language server
387 atac # postman-like TUI
388 trippy # network analyzer
389 rsync # file sync utility
390 udiskie # for mounting external drives
391 # darktable # photo editing
392 zoxide
393 chromium
394 claude-code
395 nautilus # file browser
396 sqlitebrowser
397 gnome-characters # symbol picker
398 sendme # file transfer
399 desktop-file-utils # for managing .desktop files
400 flyctl # fly.io cli
401 vscode-json-languageserver
402 gnome-network-displays
403 doppler # secret management
404
405 # --- FONTS ARE IMPORTANT ---
406 noto-fonts
407 noto-fonts-cjk-sans
408 noto-fonts-emoji
409 font-awesome # For icons in waybar, etc.
410 nerd-fonts.jetbrains-mono
411 # --- POLKIT AGENT (for 1Password GUI, etc.) ---
412 lxqt.lxqt-policykit # Lightweight polkit agent
413 ];
414
415 services.udiskie = {
416 enable = true;
417 tray = "auto";
418 automount = true;
419 };
420
421 programs.direnv.enable = true;
422
423 programs.zellij = {
424 enable = true;
425 settings = {
426 keybinds = {
427 unbind = [ "Ctrl q" ];
428 };
429 pane_frames = false;
430 ui = {
431 pane_frames.hide_session_name = true;
432 };
433 };
434 };
435
436 programs.zen-browser.enable = true;
437 # programs.swww.enable = true;
438 programs.zoxide = {
439 enable = true;
440 enableFishIntegration = true;
441 };
442
443 programs.obs-studio = {
444 enable = true;
445 plugins = with pkgs.obs-studio-plugins; [
446 obs-backgroundremoval
447 ];
448 };
449
450 # Program configurations
451 programs.git = {
452 enable = true;
453 userName = "seanaye";
454 userEmail = "hello@seanaye.ca";
455 extraConfig = {
456 init.defaultBranch = "main";
457 };
458 };
459 programs.jujutsu = {
460 enable = true;
461 settings.user = {
462 email = "hello@seanaye.ca";
463 name = "Sean Aye";
464 };
465 };
466
467 programs.home-manager.enable = true;
468
469 programs.fish = {
470 enable = true;
471 interactiveShellInit = ''
472 set fish_greeting
473 # Load 1Password CLI plugins
474 if test -f ~/.config/op/plugins.sh
475 source ~/.config/op/plugins.sh
476 end
477 '';
478 functions = {
479 s3edit = ''
480 set file (basename $argv[1])
481 set tmpfile /tmp/$file
482 aws s3 cp $argv[1] $tmpfile
483 and $EDITOR $tmpfile
484 and aws s3 cp $tmpfile $argv[1]
485 '';
486 };
487 };
488
489 programs.starship = {
490 enable = true;
491 enableFishIntegration = true;
492 };
493
494 catppuccin = {
495 enable = true;
496 flavor = "frappe";
497 };
498
499 programs.alacritty = {
500 enable = true;
501 settings = {
502 window = {
503 decorations = "none";
504 };
505 };
506
507 };
508
509 programs.helix = {
510 enable = true;
511 settings = {
512 editor = {
513 bufferline = "multiple";
514 file-picker = {
515 hidden = false;
516 git-ignore = true;
517 };
518 cursor-shape = {
519 insert = "bar";
520 normal = "block";
521 select = "underline";
522 };
523 line-number = "relative";
524 cursorline = true;
525 auto-format = true;
526 end-of-line-diagnostics = "hint";
527 soft-wrap = {
528 enable = true;
529 };
530 lsp = {
531 display-inlay-hints = true;
532 display-messages = true;
533 display-progress-messages = true;
534 };
535 inline-diagnostics = {
536 cursor-line = "hint";
537 };
538 };
539 keys = {
540 normal = {
541 esc = [
542 "keep_primary_selection"
543 "collapse_selection"
544 ];
545 };
546
547 };
548 };
549 languages = {
550 language = [
551 {
552 name = "nix";
553 auto-format = true;
554 formatter = {
555 command = "${pkgs.nixfmt-rfc-style}/bin/nixfmt";
556 };
557 }
558 {
559 name = "kotlin";
560 auto-format = true;
561 }
562 {
563 name = "rust";
564 auto-format = true;
565 formatter = {
566 command = "rustfmt";
567 args = [
568 "--edition"
569 "2024"
570 ];
571 };
572 indent = {
573 tab-width = 4;
574 unit = "t";
575 };
576 }
577 {
578 name = "astro";
579 auto-format = true;
580 formatter = {
581 command = "npx";
582 args = [
583 "prettier"
584 "--plugin"
585 "prettier-plugin-astro"
586 "--parser"
587 "astro"
588 ];
589 };
590 }
591 {
592 name = "json";
593 auto-format = true;
594 }
595 ];
596 };
597 };
598
599 dconf.settings = {
600 "org/gnome/desktop/interface" = {
601 color-scheme = "prefer-dark";
602 enable-hot-corners = false;
603 };
604 };
605
606 # Session variables
607 home.sessionVariables = {
608 EDITOR = "hx";
609 VISUAL = "hx";
610 SUDO_EDITOR = "hx";
611 SSH_AUTH_SOCK = "~/.1password/agent.sock";
612 };
613
614 # Set the state version for Home Manager
615 home.stateVersion = "25.05";
616}