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