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-2";
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
413 # --- FONTS ARE IMPORTANT ---
414 noto-fonts
415 noto-fonts-cjk-sans
416 noto-fonts-emoji
417 font-awesome # For icons in waybar, etc.
418 nerd-fonts.jetbrains-mono
419 # --- POLKIT AGENT (for 1Password GUI, etc.) ---
420 lxqt.lxqt-policykit # Lightweight polkit agent
421 ];
422
423 services.udiskie = {
424 enable = true;
425 tray = "auto";
426 automount = true;
427 };
428
429 catppuccin = {
430 enable = true;
431 flavor = "frappe";
432 };
433
434 programs.fuzzel.enable = true;
435
436 programs.direnv.enable = true;
437
438 programs.zellij = {
439 enable = true;
440 settings = {
441 keybinds = {
442 unbind = [ "Ctrl q" "Ctrl o" ];
443 normal = {
444 "bind \"Ctrl m\"" = [
445 { SwitchToMode = "Session"; }
446 ];
447 };
448 };
449 pane_frames = false;
450 ui = {
451 pane_frames.hide_session_name = true;
452 };
453 };
454 };
455
456 programs.zen-browser.enable = true;
457 # programs.swww.enable = true;
458 programs.zoxide = {
459 enable = true;
460 enableFishIntegration = true;
461 };
462
463 programs.obs-studio = {
464 enable = true;
465 plugins = with pkgs.obs-studio-plugins; [
466 obs-backgroundremoval
467 ];
468 };
469
470 # Program configurations
471 programs.git = {
472 enable = true;
473 userName = "seanaye";
474 userEmail = "hello@seanaye.ca";
475 extraConfig = {
476 init.defaultBranch = "main";
477 };
478 };
479 programs.jujutsu = {
480 enable = true;
481 settings.user = {
482 email = "hello@seanaye.ca";
483 name = "Sean Aye";
484 };
485 };
486
487 programs.home-manager.enable = true;
488
489 programs.fish = {
490 enable = true;
491 interactiveShellInit = ''
492 set fish_greeting
493 # Load 1Password CLI plugins
494 if test -f ~/.config/op/plugins.sh
495 source ~/.config/op/plugins.sh
496 end
497 '';
498 functions = {
499 s3edit = ''
500 set file (basename $argv[1])
501 set tmpfile /tmp/$file
502 aws s3 cp $argv[1] $tmpfile
503 and $EDITOR $tmpfile
504 and aws s3 cp $tmpfile $argv[1]
505 '';
506 };
507 };
508
509 programs.starship = {
510 enable = true;
511 enableFishIntegration = true;
512 };
513
514 programs.alacritty = {
515 enable = true;
516 settings = {
517 window = {
518 decorations = "none";
519 opacity = 0.9;
520 };
521 };
522
523 };
524
525 programs.helix = {
526 enable = true;
527 settings = {
528 editor = {
529 bufferline = "multiple";
530 file-picker = {
531 hidden = false;
532 git-ignore = true;
533 };
534 cursor-shape = {
535 insert = "bar";
536 normal = "block";
537 select = "underline";
538 };
539 line-number = "relative";
540 cursorline = true;
541 auto-format = true;
542 end-of-line-diagnostics = "hint";
543 soft-wrap = {
544 enable = true;
545 };
546 lsp = {
547 display-inlay-hints = true;
548 display-messages = true;
549 display-progress-messages = true;
550 };
551 inline-diagnostics = {
552 cursor-line = "hint";
553 };
554 };
555 keys = {
556 normal = {
557 esc = [
558 "keep_primary_selection"
559 "collapse_selection"
560 ];
561 };
562
563 };
564 };
565 languages = {
566 language-server.rust-analyzer = {
567 config = {
568 check = {
569 command = "clippy";
570 };
571 checkOnSave = true;
572 cargo = {
573 allFeatures = true;
574 };
575 };
576 };
577 language = [
578 {
579 name = "nix";
580 auto-format = true;
581 formatter = {
582 command = "${pkgs.nixfmt-rfc-style}/bin/nixfmt";
583 };
584 }
585 {
586 name = "kotlin";
587 auto-format = true;
588 }
589 {
590 name = "rust";
591 auto-format = true;
592 formatter = {
593 command = "rustfmt";
594 args = [
595 "--edition"
596 "2024"
597 ];
598 };
599 indent = {
600 tab-width = 4;
601 unit = "t";
602 };
603 }
604 {
605 name = "astro";
606 auto-format = true;
607 formatter = {
608 command = "npx";
609 args = [
610 "prettier"
611 "--plugin"
612 "prettier-plugin-astro"
613 "--parser"
614 "astro"
615 ];
616 };
617 }
618 {
619 name = "json";
620 auto-format = true;
621 }
622 {
623 name = "just";
624 auto-format = true;
625 formatter = {
626 command = "just";
627 args = [
628 "--justfile"
629 "/dev/stdin"
630 "--dump"
631 ];
632 };
633 }
634 {
635 name = "toml";
636 auto-format = true;
637 formatter = {
638 command = "taplo";
639 args = [
640 "format"
641 "-"
642 ];
643 };
644 }
645 ];
646 };
647 };
648
649 dconf.settings = {
650 "org/gnome/desktop/interface" = {
651 color-scheme = "prefer-dark";
652 enable-hot-corners = false;
653 };
654 };
655
656 # Session variables
657 home.sessionVariables = {
658 EDITOR = "hx";
659 VISUAL = "hx";
660 SUDO_EDITOR = "hx";
661 SSH_AUTH_SOCK = "~/.1password/agent.sock";
662 };
663
664 # Set the state version for Home Manager
665 home.stateVersion = "25.05";
666}