{ self, pkgs, inputs, lib, config, ... }: { wayland.windowManager.hyprland = { enable = true; systemd.enable = false; xwayland.enable = true; settings = { "$mod" = "SUPER"; exec-once = [ "hyprctl setcursor 24" "clipse -listen" ]; monitor = [ "eDP-1, 2560x1600@240, 0x0, 1.25" ]; bind = [ "$mod, Return, exec, kitty" "$mod, B, exec, firefox" "$mod, Space, exec, rofi -show drun" "$mod, C, exec, rofi -show calc" "$mod, P, exec, rofi -show powermenu -modi powermenu:${pkgs.rofi-power-menu}/bin/rofi-power-menu" "$mod, X, exec, kitty --class clipse -e 'clipse'" ", Print, exec, grim -g \"$(slurp)\" - | wl-copy" "$mod, Print, exec, grim - | wl-copy" "$mod, Z, exec, hyprpicker | wl-copy" "$mod, L, exec, hyprlock" "$mod, 1, workspace, 1" "$mod, 2, workspace, 2" "$mod, 3, workspace, 3" "$mod, 4, workspace, 4" "$mod, 5, workspace, 5" "$mod, 6, workspace, 6" "$mod, 7, workspace, 7" "$mod, 8, workspace, 8" "$mod, 9, workspace, 9" "$mod_SHIFT, 1, movetoworkspacesilent, 1" "$mod_SHIFT, 2, movetoworkspacesilent, 2" "$mod_SHIFT, 3, movetoworkspacesilent, 3" "$mod_SHIFT, 4, movetoworkspacesilent, 4" "$mod_SHIFT, 5, movetoworkspacesilent, 5" "$mod_SHIFT, 6, movetoworkspacesilent, 6" "$mod_SHIFT, 7, movetoworkspacesilent, 7" "$mod_SHIFT, 8, movetoworkspacesilent, 8" "$mod_SHIFT, 9, movetoworkspacesilent, 9" "$mod_SHIFT, left, movewindow, l" "$mod_SHIFT, right, movewindow, r" "$mod_SHIFT, up, movewindow, u" "$mod_SHIFT, down, movewindow, d" "$mod, left, resizeactive, -20 0" "$mod, right, resizeactive, 20 0" "$mod, up, resizeactive, 0 -20" "$mod, down, resizeactive, 0 20" "$mod_SHIFT, S, setfloating" "$mod_SHIFT, T, settiled" "$mod_SHIFT, F, fullscreen" "$mod, V, killactive" "$mod_ALT, Q, exec, loginctl terminate-user \"\"" "$mod_ALT, R, exec, hyprctl reload" ]; bindm = [ "$mod, mouse:272, movewindow" ]; windowrulev2 = [ "float,class:(clipse)" "size 622 652,class:(clipse)" # Fix XWayland Screensharing "opacity 0.0 override, class:^(xwaylandvideobridge)$" "noanim, class:^(xwaylandvideobridge)$" "noinitialfocus, class:^(xwaylandvideobridge)$" "maxsize 1 1, class:^(xwaylandvideobridge)$" "noblur, class:^(xwaylandvideobridge)$" "nofocus, class:^(xwaylandvideobridge)$" ]; general = { border_size = 2; gaps_out = "0, 8, 8, 8"; "col.active_border" = "$pink"; "col.inactive_border" = "$surface2"; }; dwindle = { preserve_split = true; smart_split = false; smart_resizing = false; }; decoration = { rounding = 10; shadow = { range = 5; }; }; gestures = { workspace_swipe = true; workspace_swipe_create_new = true; workspace_swipe_min_speed_to_force = 0; }; misc = { font_family = "SFProDisplay Nerd Font"; }; }; }; programs.waybar = { enable = true; systemd.enable = true; package = pkgs.waybar.overrideAttrs (prev: { version = "git"; mesonFlags = prev.mesonFlags ++ (lib.mapAttrsToList lib.mesonEnable {"cava" = false;}); src = pkgs.fetchFromGitHub { owner = "Alexays"; repo = "Waybar"; rev = "ac08b752e38986f4ddcc13d257aea2fafcedbc92"; sha256 = "sha256-sbzyQjOag5OC7rSrMW68srjd1k62i9qLmtmFHVu73eA="; }; patches = []; }); settings = { mainBar = { layer = "top"; position = "top"; margin = "8"; modules-left = ["custom/nixicon" "hyprland/workspaces" "hyprland/window"]; modules-center = ["clock"]; modules-right = ["battery" "custom/separator" "tray"]; "custom/nixicon" = { format = "  "; tooltip = false; }; "custom/separator" = { format = " | "; tooltip = false; }; clock = { interval = 1; locale = "en_US.utf8"; format = "{:L%r}"; format-alt = "{:L%r, %A, %B %d %Y}"; timezone = "America/Los_Angeles"; tooltip-format = "{calendar}"; calendar = { mode = "year"; mode-mon-col = 3; weeks-pos = "right"; format = { months = "{}"; days = "{}"; weeks = "W{}"; weekdays = "{}"; today = "{}"; }; }; }; battery = { bat = "BAT1"; interval = 5; full-at = 80; states = { warning = 20; critical = 10; }; format = "{icon} {capacity}%"; tooltip-format = "{timeTo} \n {power} W \n {cycles} Cycles ({health}%)"; format-icons = { discharging = ["󰁺" "󰁽" "󰁿" "󰂁" "󰁹"]; charging = ["󰂆" "󰂈" "󰂉" "󰂊" "󰂅"]; default = ["󰁺" "󰁽" "󰁿" "󰂁" "󰁹"]; }; format-time = "{H}:{M}"; }; "hyprland/workspaces" = { active-only = false; all-outputs = true; persistent-workspaces = { "*" = 9; }; }; "hyprland/window" = { icon = true; max-length = 50; }; tray = { icon-size = 21; spacing = 10; show-passive-items = true; }; }; }; style = '' * { font-family: "SF ProDisplay Nerd Font"; border: none; border-radius: 0; color: @text; } window#waybar { border-radius: 10px; background-color: @base } .modules-right { background-color: @surface0; border-radius: 5px; margin: 5px; padding: 5px; } tooltip { background-color: @base; border: 1px solid @pink; border-radius: 10px; } #window { margin-left: 10px; } #custom-nixicon { font-size: 24px; color: #7EBAE4; } #custom-separator { padding-left: 2px; padding-right: 2px; color: @subtext0; } #workspaces { margin-top: 5px; margin-bottom: 5px; } #workspaces button { background-color: @surface0; border-bottom-style: solid; border-color: @crust; border-width: 3px; } #workspaces button.empty { border-bottom-style: none; } #workspaces button.active { border-bottom-style: solid; border-color: @overlay2; border-width: 3px; } #workspaces button.urgent { border-bottom-style: solid; border-color: @red; border-width: 3px; } #workspaces button:nth-child(1) { border-radius: 5px 0px 0px 5px; } #workspaces button:nth-child(9) { border-radius: 0px 5px 5px 0px; } #clock { margin-top: 5px; margin-bottom: 5px; padding: 5px; border-radius: 5px; background-color: @surface0; } #battery.warning { color: @yellow; } #battery.critical { color: @red; } ''; }; programs.rofi = { enable = true; package = pkgs.rofi-wayland; font = "SFProDisplay Nerd Font 10"; location = "center"; terminal = "${pkgs.kitty}/bin/kitty"; extraConfig = { modi = "run,drun,window,calc"; show-icons = true; drun-display-format = "{icon} {name}"; location = 0; disable-history = false; hide-scrollbar = true; display-drun = "  Apps "; display-run = "  Run "; display-window = " 󰕰 Window"; display-calc = "  Calc"; sidebar-mode = true; }; theme = let inherit (config.lib.formats.rasi) mkLiteral; in { listview = { columns = 1; lines = 15; }; window = { border-color = mkLiteral "#f5c2e7"; border-radius = mkLiteral "10px"; }; "element selected" = { background-color = mkLiteral "#313244"; }; }; plugins = with pkgs; [ rofi-power-menu (rofi-calc.override {rofi-unwrapped = rofi-wayland-unwrapped;}) ]; }; programs.hyprlock = { enable = true; settings = { "$font" = "SF ProDisplay Nerd Font"; general = { hide_cursor = true; }; background = [ { monitor = ""; path = "color"; blur_passes = 0; color = "$base"; } ]; label = [ { monitor = ""; text = "Layout: $LAYOUT"; color = "$text"; font_size = 25; font_family = "$font"; position = "30, -30"; halign = "left"; valign = "top"; } { monitor = ""; text = "$TIME"; color = "$text"; font_size = 90; font_family = "$font"; position = "-30, 0"; halign = "right"; valign = "top"; } { monitor = ""; text = "cmd[update:43200000] date +\"%A, %d %B %Y\""; color = "$text"; font_size = 25; font_family = "$font"; position = "-30, -150"; halign = "right"; valign = "top"; } ]; input-field = [ { monitor = ""; size = "300, 60"; outline_thickness = 4; dots_size = 0.2; dots_spacing = 0.2; dots_center = true; outer_color = "$accent"; inner_color = "$surface0"; font_color = "$text"; fade_on_empty = false; placeholder_text = "󰌾 Logged in as $USER"; hide_input = false; check_color = "$accent"; fail_color = "$red"; fail_text = "$FAIL ($ATTEMPTS)"; capslock_color = "$yellow"; position = "0, -47"; halign = "center"; valign = "center"; } ]; }; }; services.hypridle = { enable = true; settings = { general = { lock_cmd = "pidof hyprlock || hyprlock"; before_sleep_cmd = "loginctl lock-session"; after_sleep_cmd = "hyprctl dispatch dpms on"; }; listener = [ { timeout = 150; on-timeout = "brightnessctl -s set 10"; on-resume = "brightnessctl -r"; } { timeout = 300; on-timeout = "loginctl lock-session"; } { timeout = 330; on-timeout = "hyprctl dispatch dpms off"; on-resume = "hyprctl dispatch dpms on"; } { timeout = 1800; on-timeout = "systemctl suspend"; } ]; }; }; services.mako = { enable = true; actions = true; borderRadius = 10; defaultTimeout = 5000; font = "SFProDisplay Nerd Font 10"; }; services.xsettingsd = { enable = true; settings = { "Gtk/CursorThemeName" = "catppuccin-mocha-pink-cursors"; "Gtk/CursorThemeSize" = 30; "Xft/Hinting" = 0; "Xft/HintStyle" = "hintnone"; "Xft/Antialias" = 1; "Xft/RGBA" = "rgb"; }; }; services.network-manager-applet.enable = true; services.pasystray.enable = true; xresources.properties = { "Xft.antialias" = 1; "Xft.hinting" = 0; "Xft.rgba" = "rgb"; "Xft.hintstyle" = "hintnone"; }; services.flatpak.overrides = { global = { Context.sockets = ["wayland" "!x11" "!fallback-x11"]; Environment = { XCURSOR_PATH = "/run/host/user-share/icons:/run/host/share/icons"; }; }; "com.discordapp.Discord".Context = { sockets = ["x11"]; }; }; home.pointerCursor = { gtk.enable = true; x11.enable = true; hyprcursor = { enable = true; size = 24; }; size = 24; }; gtk = { enable = true; font = { package = inputs.apple-fonts.packages.${pkgs.system}.sf-pro-nerd; name = "SFProDisplay Nerd Font"; size = 10; }; }; qt = { enable = true; style.name = "kvantum"; platformTheme.name = "kvantum"; }; fonts.fontconfig = { enable = true; defaultFonts = { emoji = ["Noto Color Emoji"]; monospace = ["SFMono Nerd Font"]; sansSerif = ["SFProDisplay Nerd Font"]; serif = ["SFProDisplay Nerd Font"]; }; }; xdg = { enable = true; mime.enable = true; portal = { enable = true; xdgOpenUsePortal = true; config = { common = { default = [ "gtk" ]; }; }; extraPortals = with pkgs; [ xdg-desktop-portal-gtk ]; }; userDirs = { enable = true; createDirectories = true; }; configFile = { clipse = { enable = true; target = "clipse/config.json"; text = '' { "historyFile": "clipboard_history.json", "maxHistory": 100, "allowDuplicates": false, "themeFile": "custom_theme.json", "tempDir": "tmp_files", "logFile": "clipse.log", "keyBindings": { "choose": "enter", "clearSelected": "S", "down": "down", "end": "end", "filter": "/", "home": "home", "more": "?", "nextPage": "right", "prevPage": "left", "preview": "t", "quit": "q", "remove": "x", "selectDown": "ctrl+down", "selectSingle": "s", "selectUp": "ctrl+up", "togglePin": "p", "togglePinned": "tab", "up": "up", "yankFilter": "ctrl+s" }, "imageDisplay": { "type": "kitty", "scaleX": 9, "scaleY": 9, "heightCut": 2 } } ''; }; }; }; catppuccin = { gtk = { enable = true; gnomeShellTheme = true; accent = "pink"; flavor = "mocha"; icon = { enable = true; accent = "pink"; flavor = "mocha"; }; }; cursors = { enable = true; accent = "pink"; flavor = "mocha"; }; hyprland = { enable = true; accent = "pink"; flavor = "mocha"; }; hyprlock = { enable = true; accent = "pink"; flavor = "mocha"; }; waybar = { enable = true; flavor = "mocha"; }; kvantum = { enable = true; accent = "pink"; flavor = "mocha"; }; mako = { enable = true; accent = "pink"; flavor = "mocha"; }; rofi = { enable = true; flavor = "mocha"; }; }; systemd.user.services = { mako = { Unit = { Description = "mako"; PartOf = ["graphical-session.target"]; After = ["graphical-session.target"]; }; Service = { Type = "dbus"; BusName = "org.freedesktop.Notifications"; ExecStart = "${pkgs.mako}/bin/mako"; ExecReload = "${pkgs.mako}/bin/makoctl reload"; Restart = "on-failure"; RestartSec = 1; TimeoutStopSec = 10; }; Install = { WantedBy = ["graphical-session.target"]; }; }; waybar = { Unit = { After = lib.mkForce ["graphical-session.target"]; }; }; hypridle = { Unit = { After = lib.mkForce ["graphical-session.target"]; }; }; xsettingsd = { Unit = { After = lib.mkForce ["graphical-session.target"]; }; }; network-manager-applet = { Unit = { After = lib.mkForce ["graphical-session.target"]; }; }; pasystray = { Unit = { After = lib.mkForce ["graphical-session.target"]; }; }; }; home.sessionVariables.NIXOS_OZONE_WL = "1"; home.packages = with pkgs; [ # Hyprland hyprpicker # Fonts inputs.apple-fonts.packages.${pkgs.system}.sf-pro-nerd inputs.apple-fonts.packages.${pkgs.system}.sf-pro inputs.apple-fonts.packages.${pkgs.system}.sf-mono-nerd inputs.apple-fonts.packages.${pkgs.system}.sf-mono noto-fonts-color-emoji noto-fonts self.packages.${pkgs.system}.nerd-fonts-sf-mono-ligatures # Screenshot slurp grim # Clipboard wl-clipboard clipse # Utils brightnessctl xwaylandvideobridge ]; }