diff --git a/flake.lock b/flake.lock index 7deb4a9..9d35b51 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,20 @@ { "nodes": { + "catppuccin": { + "locked": { + "lastModified": 1721784420, + "narHash": "sha256-bgF6fN4Qgk7NErFKGuuqWXcLORsiykTYyqMUFRiAUBY=", + "owner": "catppuccin", + "repo": "nix", + "rev": "8bdb55cc1c13f572b6e4307a3c0d64f1ae286a4f", + "type": "github" + }, + "original": { + "owner": "catppuccin", + "repo": "nix", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -38,6 +53,7 @@ }, "root": { "inputs": { + "catppuccin": "catppuccin", "home-manager": "home-manager", "nixpkgs": "nixpkgs" } diff --git a/flake.nix b/flake.nix index c55fea8..168f604 100644 --- a/flake.nix +++ b/flake.nix @@ -5,9 +5,11 @@ nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; home-manager.url = "github:nix-community/home-manager"; home-manager.inputs.nixpkgs.follows = "nixpkgs"; + + catppuccin.url = "github:catppuccin/nix"; }; - outputs = { self, nixpkgs, home-manager, ... }: + outputs = { self, nixpkgs, home-manager, catppuccin, ... }: let lib = nixpkgs.lib; pkgs = nixpkgs.legacyPackages."x86_64-linux"; @@ -15,13 +17,13 @@ nixosConfigurations = { nixos = lib.nixosSystem { specialArgs = { inherit self; }; - modules = [ ./nixos/configuration.nix ]; + modules = [ ./nixos/configuration.nix catppuccin.nixosModules.catppuccin ]; }; }; homeConfigurations = { luxzi = home-manager.lib.homeManagerConfiguration { inherit pkgs; - modules = [ ./home-manager/home.nix ]; + modules = [ ./home-manager/home.nix catppuccin.homeManagerModules.catppuccin ]; }; }; }; diff --git a/home-manager/packages/hyprland/dunst.nix b/home-manager/packages/hyprland/dunst.nix new file mode 100644 index 0000000..e4c474d --- /dev/null +++ b/home-manager/packages/hyprland/dunst.nix @@ -0,0 +1,16 @@ +{ ... }: + +{ + services.dunst = { + enable = true; + catppuccin.enable = true; + settings = { + global = { + offset = "10x10"; + origin = "bottom-right"; + width = 300; + height = 500; + }; + }; + }; +} diff --git a/home-manager/packages/hyprland/hyprland.nix b/home-manager/packages/hyprland/hyprland.nix new file mode 100644 index 0000000..5f306c0 --- /dev/null +++ b/home-manager/packages/hyprland/hyprland.nix @@ -0,0 +1,143 @@ +{ pkgs, ... }: + +{ + imports = [ + ./waybar.nix + ./wofi.nix + ./dunst.nix + ./hyprlock.nix + ]; + + wayland.windowManager.hyprland = { + enable = true; + systemd.enable = true; + extraConfig = '' + # Monitors + monitor =HDMI-A-1,2560x1080@75,auto,1 + + # Autostart + exec = pkill waybar; sleep 0.5; waybar + exec = pkill swaybg; sleep 0.5; swaybg + exec = waypaper --restore + + env = LIBVA_DRIVER_NAME,nvidia + env = XDG_SESSION_TYPE,wayland + env = GBM_BACKEND,nvidia-drm + env = __GLX_VENDOR_LIBRARY_NAME,nvidia + env = NVD_BACKEND,direct + + # Input config + input { + kb_layout = us + follow_mouse = 1 + sensitivity = 0 + } + + general { + gaps_in = 5 + gaps_out = 10 + border_size = 2 + col.active_border = rgba(89b4faff) rgba(b4befeff) 45deg + col.inactive_border = rgba(45475aff) + } + + decoration { + rounding = 10 + + blur { + enabled = true + size = 15 + passes = 1 + new_optimizations = true + } + + drop_shadow = true + shadow_range = 4 + shadow_render_power = 3 + col.shadow = rgba(1e1e2ebb) + } + + animations { + enabled = true + + } + + cursor { + no_hardware_cursors = true + } + + $mainMod = SUPER + + bind = $mainMod, m, exit, + bind = $mainMod, v, togglefloating, + bind = $mainMod, q, killactive, + bind = $mainMod, s, togglesplit, + bind = $mainMod, f, fullscreen, + bind = $mainMod, p, pin, + + bind =, Print, exec, grim - | wl-copy + bind = SHIFT, Print, exec, grim -g "$(slurp)" - | wl-copy + + bind = $mainMod, r, exec, wofi --show drun --allow-images + + bind = $mainMod,Tab,cyclenext, + bind = $mainMod,Tab,bringactivetotop, + + bind = $mainMod,e,exec,hyprlock + + bind = $mainMod, h, movefocus, l + bind = $mainMod, j, movefocus, d + bind = $mainMod, k, movefocus, u + bind = $mainMod, l, movefocus, r + + bind = $mainMod, 1, workspace, 1 + bind = $mainMod, 2, workspace, 2 + bind = $mainMod, 3, workspace, 3 + bind = $mainMod, 4, workspace, 4 + bind = $mainMod, 5, workspace, 5 + bind = $mainMod, 6, workspace, 6 + bind = $mainMod, 7, workspace, 7 + bind = $mainMod, 8, workspace, 8 + bind = $mainMod, 9, workspace, 9 + bind = $mainMod, 0, workspace, 10 + + bind = $mainMod SHIFT, 1, movetoworkspace, 1 + bind = $mainMod SHIFT, 2, movetoworkspace, 2 + bind = $mainMod SHIFT, 3, movetoworkspace, 3 + bind = $mainMod SHIFT, 4, movetoworkspace, 4 + bind = $mainMod SHIFT, 5, movetoworkspace, 5 + bind = $mainMod SHIFT, 6, movetoworkspace, 6 + bind = $mainMod SHIFT, 7, movetoworkspace, 7 + bind = $mainMod SHIFT, 8, movetoworkspace, 8 + bind = $mainMod SHIFT, 9, movetoworkspace, 9 + bind = $mainMod SHIFT, 0, movetoworkspace, 10 + + bind = $mainMod, mouse_down, workspace, e+1 + bind = $mainMod, mouse_up, workspace, e-1 + + bindm = $mainMod, mouse:272, movewindow + bindm = $mainMod, mouse:273, resizewindow + bindm = ALT, mouse:272, resizewindow + ''; + }; + + home.packages = with pkgs; [ + wofi + waypaper + swaybg + waybar + pavucontrol + libsForQt5.qtstyleplugins + libsForQt5.qt5ct + kdePackages.qt6ct + kdePackages.breeze + breeze-gtk + catppuccin + grim + slurp + catppuccin-kvantum + kdePackages.qtstyleplugin-kvantum + ]; + + catppuccin.flavor = "mocha"; +} diff --git a/home-manager/packages/hyprland/hyprlock.nix b/home-manager/packages/hyprland/hyprlock.nix new file mode 100644 index 0000000..d9ce20a --- /dev/null +++ b/home-manager/packages/hyprland/hyprlock.nix @@ -0,0 +1,39 @@ +{ ... }: + +{ + programs.hyprlock = { + enable = true; + settings = { + general = { + disable_loading_bar = true; + grace = 0; + hide_cursor = true; + no_fade_in = false; + }; + + background = [ + { + path = "screenshot"; + blur_passes = 3; + blur_size = 8; + } + ]; + + input-field = [ + { + size = "200, 50"; + position = "0, -80"; + monitor = ""; + dots_center = true; + fade_on_empty = false; + font_color = "rgb(202, 211, 245)"; + inner_color = "rgb(91, 96, 120)"; + outer_color = "rgb(24, 25, 38)"; + outline_thickness = 5; + placeholder_text = ''Password...''; + shadow_passes = 2; + } + ]; + }; + }; +} diff --git a/home-manager/packages/hyprland/waybar.nix b/home-manager/packages/hyprland/waybar.nix new file mode 100644 index 0000000..c661e47 --- /dev/null +++ b/home-manager/packages/hyprland/waybar.nix @@ -0,0 +1,112 @@ +{ ... }: + +{ + programs.waybar = { + enable = true; + style = '' + * { + font-family: "FiraCode Nerd Font", sans-serif; + } + + window#waybar { + background-color: #1e1e2e; + color: #cdd6f4; + transition-property: background-color; + transition-duration: 500ms; + border: 1px solid transparent; + border-radius: 0px 0px 20px 20px; + } + + button { + box-shadow: inset 0px -3px transparent; + } + + button:hover { + background: #181825; + } + + #workspaces { + background: #1e1e2e; + } + + #workspaces button { + padding: 5px; + background-color: transparent; + color: #cdd6f4; + } + + #workspaces button:hover { + background: #181825; + } + + #workspaces button.active { + background-color: #313244; + } + + #workspaces button.urgent { + background-color: #f9e2af; + } + + #window, + #pulseaudio, + #network, + #tray, + #clock { + background-color: #1e1e2e; + color: #cdd6f4; + padding: 0px 5px 0px 5px; + } + + .modules-right { + padding-right: 10px; + } + + .modules-left { + padding-left: 10px; + } + ''; + settings = { + mainBar = { + height = 30; + width = 1920; + spacing = 4; + modules-left = [ "hyprland/workspaces" ]; + modules-center = [ "hyprland/window" ]; + modules-right = [ "tray" "pulseaudio" "network" "clock" ]; + + "hyprland/window" = { + icon = true; + format = "{initialTitle}"; + }; + + network = { + format-wifi = "{essid} ({signalStrength}%)  "; + format-ethernet = "{ipaddr}/{cidr} "; + tooltip-format = "{ifname} via {gwaddr} "; + format-linked = "{ifname} (No IP) "; + format-disconnected = "Disconnected ⚠"; + format-alt = "{ifname}: {ipaddr}/{cidr}"; + }; + + pulseaudio = { + format = "{volume}% {icon} {format_source}"; + format-bluetooth = "{volume}% {icon} {format_source}"; + format-bluetooth-muted = " {icon} {format_source}"; + format-muted = " {format_source}"; + format-source = "{volume}% "; + format-source-muted = ""; + format-icons = { + headphone = " "; + hands-free = ""; + headset = ""; + phone = ""; + portable = ""; + car = ""; + default = [ "" "" " " ]; + }; + on-click = "pavucontrol"; + }; + }; + }; + }; +} diff --git a/home-manager/packages/hyprland/wofi.nix b/home-manager/packages/hyprland/wofi.nix new file mode 100644 index 0000000..a6fcbec --- /dev/null +++ b/home-manager/packages/hyprland/wofi.nix @@ -0,0 +1,185 @@ +{ ... }: + +{ + programs.wofi = { + enable = true; + style = '' + @define-color rosewater #f5e0dc; + @define-color rosewater-rgb rgb(245, 224, 220); + @define-color flamingo #f2cdcd; + @define-color flamingo-rgb rgb(242, 205, 205); + @define-color pink #f5c2e7; + @define-color pink-rgb rgb(245, 194, 231); + @define-color mauve #cba6f7; + @define-color mauve-rgb rgb(203, 166, 247); + @define-color red #f38ba8; + @define-color red-rgb rgb(243, 139, 168); + @define-color maroon #eba0ac; + @define-color maroon-rgb rgb(235, 160, 172); + @define-color peach #fab387; + @define-color peach-rgb rgb(250, 179, 135); + @define-color yellow #f9e2af; + @define-color yellow-rgb rgb(249, 226, 175); + @define-color green #a6e3a1; + @define-color green-rgb rgb(166, 227, 161); + @define-color teal #94e2d5; + @define-color teal-rgb rgb(148, 226, 213); + @define-color sky #89dceb; + @define-color sky-rgb rgb(137, 220, 235); + @define-color sapphire #74c7ec; + @define-color sapphire-rgb rgb(116, 199, 236); + @define-color blue #89b4fa; + @define-color blue-rgb rgb(137, 180, 250); + @define-color lavender #b4befe; + @define-color lavender-rgb rgb(180, 190, 254); + @define-color text #cdd6f4; + @define-color text-rgb rgb(205, 214, 244); + @define-color subtext1 #bac2de; + @define-color subtext1-rgb rgb(186, 194, 222); + @define-color subtext0 #a6adc8; + @define-color subtext0-rgb rgb(166, 173, 200); + @define-color overlay2 #9399b2; + @define-color overlay2-rgb rgb(147, 153, 178); + @define-color overlay1 #7f849c; + @define-color overlay1-rgb rgb(127, 132, 156); + @define-color overlay0 #6c7086; + @define-color overlay0-rgb rgb(108, 112, 134); + @define-color surface2 #585b70; + @define-color surface2-rgb rgb(88, 91, 112); + @define-color surface1 #45475a; + @define-color surface1-rgb rgb(69, 71, 90); + @define-color surface0 #313244; + @define-color surface0-rgb rgb(49, 50, 68); + @define-color base #1e1e2e; + @define-color base-rgb rgb(30, 30, 46); + @define-color mantle #181825; + @define-color mantle-rgb rgb(24, 24, 37); + @define-color crust #11111b; + @define-color crust-rgb rgb(17, 17, 27); + + * { + font-family: 'FiraCode Nerd Font', monospace; + font-size: 14px; + } + + /* Window */ + window { + margin: 0px; + padding: 10px; + border: 0.16em solid @lavender; + border-radius: 20px; + background-color: @base; + animation: slideIn 0.5s ease-in-out both; + } + + /* Slide In */ + @keyframes slideIn { + 0% { + opacity: 0; + } + + 100% { + opacity: 1; + } + } + + /* Inner Box */ + #inner-box { + margin: 5px; + padding: 10px; + border: none; + border-radius: 20px; + background-color: @base; + animation: fadeIn 0.5s ease-in-out both; + } + + /* Fade In */ + @keyframes fadeIn { + 0% { + opacity: 0; + } + + 100% { + opacity: 1; + } + } + + /* Outer Box */ + #outer-box { + margin: 5px; + padding: 10px; + border: none; + border-radius: 20px; + background-color: @base; + } + + /* Scroll */ + #scroll { + margin: 0px; + padding: 10px; + border: none; + background-color: @base; + } + + /* Input */ + #input { + margin: 5px 20px; + padding: 10px; + border: none; + border-radius: 20px; + color: @text; + background-color: @base; + animation: fadeIn 0.5s ease-in-out both; + } + + #input image { + border: none; + color: @red; + } + + #input * { + outline: 4px solid @red!important; + } + + /* Text */ + #text { + margin: 5px; + border: none; + color: @text; + animation: fadeIn 0.5s ease-in-out both; + } + + #entry { + background-color: @base; + padding: 10px; + } + + #entry arrow { + border: none; + color: @lavender; + } + + /* Selected Entry */ + #entry:selected { + border: 0.11em solid @lavender; + border-radius: 20px; + } + + #entry:selected #text { + color: @mauve; + } + + #entry:drop(active) { + background-color: @lavender!important; + } + + ''; + settings = { + no_actions = true; + display = "grid"; + columns = 4; + rows = 3; + + }; + }; +} diff --git a/home-manager/packages/kitty.nix b/home-manager/packages/kitty.nix index cb0d531..ac34fa4 100644 --- a/home-manager/packages/kitty.nix +++ b/home-manager/packages/kitty.nix @@ -11,6 +11,8 @@ }; settings = { window_padding_width = 4; + background_opacity = "0.65"; + background_blur = 1; }; }; } diff --git a/home-manager/packages/packages.nix b/home-manager/packages/packages.nix index c01347b..57328d9 100644 --- a/home-manager/packages/packages.nix +++ b/home-manager/packages/packages.nix @@ -7,6 +7,7 @@ ./git.nix ./emacs.nix ./kitty.nix + ./hyprland/hyprland.nix ]; home.packages = with pkgs; [ @@ -22,5 +23,7 @@ zoxide tor-browser nix-search-cli + mpv + dolphin ]; } diff --git a/nixos/configuration.nix b/nixos/configuration.nix index 21c024e..c19a254 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -4,7 +4,8 @@ imports = [ # Include the results of the hardware scan. ./hardware/hardware.nix - ./environments/plasma-wayland.nix + # ./environments/plasma-wayland.nix + ./environments/hyprland.nix ./users/luxzi.nix ./services/services.nix ./programs/programs.nix diff --git a/nixos/environments/hyprland.nix b/nixos/environments/hyprland.nix new file mode 100644 index 0000000..7d45e1f --- /dev/null +++ b/nixos/environments/hyprland.nix @@ -0,0 +1,17 @@ +{ config, lib, pkgs, ... }: + +{ + programs.hyprland = { + enable = true; + xwayland.enable = true; + }; + + services.xserver.videoDrivers = ["nvidia"]; + services.displayManager.sddm.enable = true; + services.displayManager.sddm.wayland.enable = true; + services.displayManager.sddm.theme = "Breeze"; + + environment.variables.QT_QPA_PLATFORM = "wayland"; + environment.variables.QT_QPA_PLATFORMTHEME = "qt6ct"; + environment.variables.GTK_THEME = "Breeze"; +}