{ lib, config, inputs, pkgs, ...} : let pathToKeys = ../common/keys/yubi; yubiKeys = lib.lists.forEach (builtins.attrNames (builtins.readDir pathToKeys)) (key: lib.substring 0 (lib.stringLength key - lib.stringLength ".pub") key); # Remove .pub suffix. yubikeyPublicKeyEntries = lib.attrsets.mergeAttrsList ( lib.lists.map (key: { ".ssh/${key}.pub".source = "${pathToKeys}/${key}.pub"; }) yubiKeys ); in { imports = [ ../../home-modules/nvim.nix ../../home-modules/zsh.nix ../../home-modules/git.nix ../../home-modules/lazygit.nix ../../home-modules/starship.nix ../../home-modules/ghostty-config.nix ../../home-modules/sops.nix inputs.walker.homeManagerModules.default ]; home = { username = "jmug"; homeDirectory = "/home/jmug"; packages = with pkgs; [ # Secret management. age sops ]; file = {} // yubikeyPublicKeyEntries; stateVersion = "25.05"; # Do not change!!! }; programs.walker = { enable = true; config = { ui.fullscreen = true; list = { height = 200; }; websearch.prefix = "?"; }; }; programs.ssh = { enable = true; addKeysToAgent = "yes"; matchBlocks = { "git" = { host = "github.com"; user = "git"; identityFile = [ "/home/jmug/.ssh/id_yubikey" # Auto updated symlik that matches all yubikeys. "/home/jmug/.ssh/id_jmug" # Fallback key with passphrase. ]; }; "forgejo" = { host = "code.jmug.me"; user = "forgejo"; identityFile = [ "/home/jmug/.ssh/id_yubikey" # Auto updated symlik that matches all yubikeys. "/home/jmug/.ssh/id_jmug" # Fallback key with passphrase. ]; }; wsl = { user = "jmug"; hostname = "192.168.10.241"; port = 69; forwardAgent = true; identityFile = [ "/home/jmug/.ssh/id_yubikey" # Auto updated symlik that matches all yubikeys. ]; }; ws = { user = "jmug"; hostname = "98.59.213.212"; port = 69; forwardAgent = true; identityFile = [ "/home/jmug/.ssh/id_yubikey" # Auto updated symlik that matches all yubikeys. ]; }; }; }; wayland.windowManager.hyprland.enable = true; wayland.windowManager.hyprland.settings = { monitor = [ ",preferred,auto,auto" "eDP-1,preferred,auto,1.333333" ]; "$terminal" = "ghostty"; "$fileManager" = "dolphin"; # TODO: Change. "$menu" = "wofi --show drun"; # TODO: Change. env = [ "XCURSOR_SIZE,24" "HYPRCURSOR_SIZE,24" ]; general = { gaps_in = 5; gaps_out = 20; border_size = 2; # https://wiki.hyprland.org/Configuring/Variables/#variable-types for info about colors "col.active_border" = "rgba(33ccffee) rgba(00ff99ee) 45deg"; "col.inactive_border" = "rgba(595959aa)"; # Set to true enable resizing windows by clicking and dragging on borders and gaps resize_on_border = false; # Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on allow_tearing = false; layout = "dwindle"; }; decoration = { rounding = 10; rounding_power = 2; # Change transparency of focused and unfocused windows active_opacity = "1.0"; inactive_opacity = "1.0"; shadow = { enabled = true; range = 4; render_power = 3; color = "rgba(1a1a1aee)"; }; # https://wiki.hyprland.org/Configuring/Variables/#blur blur = { enabled = true; size = 3; passes = 1; vibrancy = "0.1696"; }; }; animations = { # enabled = yes, please :) enabled = "no"; }; # See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more dwindle = { pseudotile = true; # Master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below preserve_split = true; # You probably want this }; # See https://wiki.hyprland.org/Configuring/Master-Layout/ for more master = { new_status = "master"; }; # https://wiki.hyprland.org/Configuring/Variables/#misc misc = { force_default_wallpaper = 1; # Set to 0 or 1 to disable the anime mascot wallpapers disable_hyprland_logo = true; # If true disables the random hyprland logo / anime girl background. :( }; # https://wiki.hyprland.org/Configuring/Variables/#input input = { kb_layout = "us"; follow_mouse = 1; sensitivity = 0; # -1.0 - 1.0, 0 means no modification. touchpad = { natural_scroll = true; tap-to-click = false; disable_while_typing = true; }; }; gestures = { workspace_swipe = false; }; "$mainMod" = "SUPER"; # Sets "Windows" key as main modifier # Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more bind = [ "$mainMod, return, exec, $terminal" "$mainMod, Q, killactive," "$mainMod SHIFT, Q, exit," # "$mainMod, E, exec, $fileManager" "$mainMod, V, togglefloating," "$mainMod, R, exec, $menu" "$mainMod, P, pseudo," # dwindle "$mainMod, J, togglesplit," # dwindle # Move focus with mainMod + arrow keys "$mainMod, M, movefocus, l" "$mainMod, I, movefocus, r" "$mainMod, N, movefocus, d" "$mainMod, E, movefocus, u" # Switch workspaces with mainMod + [0-9] "$mainMod, 1, workspace, 1" "$mainMod, 2, workspace, 2" "$mainMod, 3, workspace, 3" "$mainMod, 4, workspace, 4" "$mainMod, 5, workspace, 5" "$mainMod, 6, workspace, 6" "$mainMod, 7, workspace, 7" "$mainMod, 8, workspace, 8" "$mainMod, 9, workspace, 9" "$mainMod, 0, workspace, 10" # Move active window to a workspace with mainMod + SHIFT + [0-9] "$mainMod SHIFT, 1, movetoworkspace, 1" "$mainMod SHIFT, 2, movetoworkspace, 2" "$mainMod SHIFT, 3, movetoworkspace, 3" "$mainMod SHIFT, 4, movetoworkspace, 4" "$mainMod SHIFT, 5, movetoworkspace, 5" "$mainMod SHIFT, 6, movetoworkspace, 6" "$mainMod SHIFT, 7, movetoworkspace, 7" "$mainMod SHIFT, 8, movetoworkspace, 8" "$mainMod SHIFT, 9, movetoworkspace, 9" "$mainMod SHIFT, 0, movetoworkspace, 10" # Example special workspace (scratchpad) "$mainMod, S, togglespecialworkspace, magic" "$mainMod SHIFT, S, movetoworkspace, special:magic" # Scroll through existing workspaces with mainMod + scroll "$mainMod, mouse_down, workspace, e+1" "$mainMod, mouse_up, workspace, e-1" # App launcher "$mainMod, space, exec, GSK_RENDERER=ngl walker" ]; bindm = [ # Move/resize windows with mainMod + LMB/RMB and dragging "$mainMod, mouse:272, movewindow" "$mainMod, mouse:273, resizewindow" ]; bindel = [ # Laptop multimedia keys for volume and LCD brightness ",XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+" ",XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-" ",XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle" ",XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle" ",XF86MonBrightnessUp, exec, brightnessctl -e4 -n2 set 5%+" ",XF86MonBrightnessDown, exec, brightnessctl -e4 -n2 set 5%-" ]; bindl = [ # Requires playerctl " , XF86AudioNext, exec, playerctl next" " , XF86AudioPause, exec, playerctl play-pause" " , XF86AudioPlay, exec, playerctl play-pause" " , XF86AudioPrev, exec, playerctl previous" ]; ############################## ### WINDOWS AND WORKSPACES ### ############################## # See https://wiki.hyprland.org/Configuring/Window-Rules/ for more # See https://wiki.hyprland.org/Configuring/Workspace-Rules/ for workspace rules # Example windowrule # windowrule = float,class:^(kitty)$,title:^(kitty)$ windowrule = [ # Ignore maximize requests from apps. You'll probably like this. "suppressevent maximize, class:.*" # Fix some dragging issues with XWayland "nofocus,class:^$,title:^$,xwayland:1,floating:1,fullscreen:0,pinned:0" ]; }; programs.zsh.shellAliases = { # TODO: Interpolate the name of the host here. nrsw = "sudo nixos-rebuild switch --flake /home/jmug/nixos#asahi"; # parametrize this as home dir. }; # Let Home Manager install and manage itself. programs.home-manager.enable = true; }