add: hyprland config
This commit is contained in:
parent
d582a11ed8
commit
f07bda4e8a
11 changed files with 540 additions and 4 deletions
16
flake.lock
generated
16
flake.lock
generated
|
@ -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"
|
||||
}
|
||||
|
|
|
@ -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 ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
16
home-manager/packages/hyprland/dunst.nix
Normal file
16
home-manager/packages/hyprland/dunst.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
services.dunst = {
|
||||
enable = true;
|
||||
catppuccin.enable = true;
|
||||
settings = {
|
||||
global = {
|
||||
offset = "10x10";
|
||||
origin = "bottom-right";
|
||||
width = 300;
|
||||
height = 500;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
143
home-manager/packages/hyprland/hyprland.nix
Normal file
143
home-manager/packages/hyprland/hyprland.nix
Normal file
|
@ -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";
|
||||
}
|
39
home-manager/packages/hyprland/hyprlock.nix
Normal file
39
home-manager/packages/hyprland/hyprlock.nix
Normal file
|
@ -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 = ''<span foreground="##cad3f5">Password...</span>'';
|
||||
shadow_passes = 2;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
112
home-manager/packages/hyprland/waybar.nix
Normal file
112
home-manager/packages/hyprland/waybar.nix
Normal file
|
@ -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";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
185
home-manager/packages/hyprland/wofi.nix
Normal file
185
home-manager/packages/hyprland/wofi.nix
Normal file
|
@ -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;
|
||||
|
||||
};
|
||||
};
|
||||
}
|
|
@ -11,6 +11,8 @@
|
|||
};
|
||||
settings = {
|
||||
window_padding_width = 4;
|
||||
background_opacity = "0.65";
|
||||
background_blur = 1;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -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
|
||||
];
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
17
nixos/environments/hyprland.nix
Normal file
17
nixos/environments/hyprland.nix
Normal file
|
@ -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";
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue