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