initial commit
Some checks failed
Nix CI / build (push) Failing after 31s

This commit is contained in:
Rustam Efimov 2026-04-01 08:50:01 +03:00
commit 30ce0dafc2
No known key found for this signature in database
195 changed files with 8902 additions and 0 deletions

View file

@ -0,0 +1,57 @@
{ config, ... }:
let
animationSpeed = config.theme.animation-speed;
animationDuration =
if animationSpeed == "slow" then
"4"
else if animationSpeed == "medium" then
"2.5"
else
"1.5";
borderDuration =
if animationSpeed == "slow" then
"10"
else if animationSpeed == "medium" then
"6"
else
"3";
in
{
wayland.windowManager.hyprland.settings = {
animations = {
enabled = true;
bezier = [
"linear, 0, 0, 1, 1"
"md3_standard, 0.2, 0, 0, 1"
"md3_decel, 0.05, 0.7, 0.1, 1"
"md3_accel, 0.3, 0, 0.8, 0.15"
"overshot, 0.05, 0.9, 0.1, 1.1"
"crazyshot, 0.1, 1.5, 0.76, 0.92"
"hyprnostretch, 0.05, 0.9, 0.1, 1.0"
"menu_decel, 0.1, 1, 0, 1"
"menu_accel, 0.38, 0.04, 1, 0.07"
"easeInOutCirc, 0.85, 0, 0.15, 1"
"easeOutCirc, 0, 0.55, 0.45, 1"
"easeOutExpo, 0.16, 1, 0.3, 1"
"softAcDecel, 0.26, 0.26, 0.15, 1"
"md2, 0.4, 0, 0.2, 1"
];
animation = [
"windows, 1, ${animationDuration}, md3_decel, popin 60%"
"windowsIn, 1, ${animationDuration}, md3_decel, popin 60%"
"windowsOut, 1, ${animationDuration}, md3_accel, popin 60%"
"border, 1, ${borderDuration}, default"
"fade, 1, ${animationDuration}, md3_decel"
"layersIn, 1, ${animationDuration}, menu_decel, slide"
"layersOut, 1, ${animationDuration}, menu_accel"
"fadeLayersIn, 1, ${animationDuration}, menu_decel"
"fadeLayersOut, 1, ${animationDuration}, menu_accel"
"workspaces, 1, ${animationDuration}, menu_decel, slide"
"specialWorkspace, 1, ${animationDuration}, md3_decel, slidevert"
];
};
};
}

View file

@ -0,0 +1,10 @@
{ pkgs, ... }:
{
wayland.windowManager.hyprland.settings = {
exec-once = [
"hyprpaper"
"${pkgs.firefox}/bin/firefox"
"${pkgs.throne}/bin/Throne"
];
};
}

View file

@ -0,0 +1,79 @@
{ pkgs, ... }:
{
wayland.windowManager.hyprland.settings = {
"$mainMod" = "SUPER";
"$shiftMod" = "SUPER_SHIFT";
bind = [
# Control
"$mainMod, C, killactive,"
"$mainMod, ESCAPE, exit,"
"$mainMod, V, togglefloating,"
"$mainMod, S, togglesplit,"
# Programs
"$mainMod, T, exec, alacritty"
"$mainMod, M, exec, ${pkgs.wofi}/bin/wofi --show drun"
# Move focus with "jkl;"
"$mainMod, j, movefocus, l"
"$mainMod, semicolon, movefocus, r"
"$mainMod, l, movefocus, u"
"$mainMod, k, movefocus, d"
# Move focus with arrows
"$mainMod, left, movefocus, l"
"$mainMod, right, movefocus, r"
"$mainMod, up, movefocus, u"
"$mainMod, down, movefocus, d"
# Screenshots
",PRINT, exec, ${pkgs.hyprshot}/bin/hyprshot -m region -o ~/Pictures/Screenshots"
"ALT,PRINT, exec, ${pkgs.hyprshot}/bin/hyprshot -m window -active -o ~/Pictures/Screenshots" # Screenshot active window
"$mainMod,PRINT, exec, ${pkgs.hyprshot}/bin/hyprshot -m output -o ~/Pictures/Screenshots" # Screenshot monitor
"$shiftMod,PRINT, exec, ${pkgs.hyprshot}/bin/hyprshot -m window -o ~/Pictures/Screenshots" # Screenshot window
# Switch workspaces
"$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 window to workspace
"$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"
# Scroll through existing workspaces with mainMod + scroll
"$mainMod, mouse_down, workspace, e+1"
"$mainMod, mouse_up, workspace, e-1"
];
bindm = [
# Move/resize windows with mainMod + LMB/RMB and dragging
"$mainMod, mouse:272, movewindow"
"$mainMod, mouse:273, resizewindow"
];
bindel = [
# 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%-"
];
};
}

View file

@ -0,0 +1,44 @@
{
config,
lib,
...
}:
let
border-size = toString config.theme.border-size;
gaps-in = toString config.theme.gaps-in;
gaps-out = toString config.theme.gaps-out;
active-opacity = toString config.theme.active-opacity;
inactive-opacity = toString config.theme.inactive-opacity;
rounding = toString config.theme.rounding;
inherit (config.theme) blur;
inactive-border = "rgb(" + config.theme.colors.base00 + ")";
active-border = "rgb(" + config.theme.colors.base05 + ")";
in
{
wayland.windowManager.hyprland.settings = {
general = {
resize_on_border = true;
gaps_in = gaps-in;
gaps_out = gaps-out;
border_size = border-size;
layout = "dwindle";
"col.active_border" = lib.mkForce active-border;
"col.inactive_border" = lib.mkForce inactive-border;
};
decoration = {
inherit rounding;
active_opacity = active-opacity;
inactive_opacity = inactive-opacity;
shadow = {
enabled = true;
range = 20;
render_power = 3;
};
blur = {
enabled = if blur then "true" else "false";
size = 18;
};
};
};
}

View file

@ -0,0 +1,70 @@
{
imports = [
./animations.nix
./autorun.nix
./bindings.nix
./decoration.nix
./hyprlauncher.nix
./hyprpanel.nix
./hyprpaper.nix
./hyprtoolkit.nix
./input.nix
./rules.nix
];
wayland.windowManager.hyprland = {
enable = true;
};
wayland.windowManager.hyprland.settings = {
env = [
"XDG_CURRENT_DESKTOP,Hyprland"
"MOZ_ENABLE_WAYLAND,1"
"ANKI_WAYLAND,1"
"DISABLE_QT5_COMPAT,0"
"NIXOS_OZONE_WL,1"
"XDG_SESSION_TYPE,wayland"
"XDG_SESSION_DESKTOP,Hyprland"
"QT_AUTO_SCREEN_SCALE_FACTOR,1"
"QT_QPA_PLATFORM=wayland,xcb"
"QT_WAYLAND_DISABLE_WINDOWDECORATION,1"
"ELECTRON_OZONE_PLATFORM_HINT,auto"
"__GL_GSYNC_ALLOWED,0"
"__GL_VRR_ALLOWED,0"
"DISABLE_QT5_COMPAT,0"
"DIRENV_LOG_FORMAT,"
"WLR_DRM_NO_ATOMIC,1"
"WLR_BACKEND,vulkan"
"WLR_RENDERER,vulkan"
"WLR_NO_HARDWARE_CURSORS,1"
"SDL_VIDEODRIVER,wayland"
"CLUTTER_BACKEND,wayland"
];
monitor = [
",preffered,auto,1"
];
dwindle = {
pseudotile = true;
preserve_split = true;
};
master = {
new_status = true;
allow_small_split = true;
mfact = 0.5;
};
misc = {
vfr = true;
disable_hyprland_logo = true;
disable_splash_rendering = true;
disable_autoreload = true;
focus_on_activate = true;
on_focus_under_fullscreen = 2;
};
"debug:disable_scale_checks" = true;
};
}

View file

@ -0,0 +1,26 @@
{
services.hyprlauncher = {
enable = true;
settings = {
cache = {
enabled = false;
};
finders = {
default_finder = "desktop";
desktop_prefix = "";
unicode_prefix = ".";
math_prefix = "=";
font_prefix = "'";
desktop_launch_prefix = "";
desktop_icons = true;
};
general = {
grab_focus = true;
};
ui = {
window_size = "400 260";
};
};
};
}

View file

@ -0,0 +1,224 @@
{
config,
lib,
...
}:
let
inherit (config.theme.bar) transparentButtons;
accent = "#${config.lib.stylix.colors.base0D}";
accent-alt = "#${config.lib.stylix.colors.base03}";
background = "#${config.lib.stylix.colors.base00}";
background-alt = "#${config.lib.stylix.colors.base01}";
foreground = "#${config.lib.stylix.colors.base05}";
foregroundOnWallpaper = "#${config.theme.textColorOnWallpaper}";
font = "${config.stylix.fonts.serif.name}";
fontSizeForHyprpanel = "${toString config.stylix.fonts.sizes.desktop}px";
inherit (config.theme) rounding;
inherit (config.theme) border-size;
inherit (config.theme) gaps-out;
inherit (config.theme) gaps-in;
inherit (config.theme.bar) floating;
inherit (config.theme.bar) transparent;
inherit (config.theme.bar) position;
notificationOpacity = 90;
in
{
programs.hyprpanel = {
enable = true;
settings = lib.mkForce {
bar = {
layouts = {
"*" = {
left = [
"dashboard"
"workspaces"
"windowtitle"
];
middle = [
"media"
"cava"
];
right = [
"systray"
"volume"
"clock"
"notifications"
"kbinput"
];
};
};
launcher.icon = "";
workspaces = {
show_numbered = false;
workspaces = 7;
numbered_active_indicator = "color";
monitorSpecific = false;
applicationIconEmptyWorkspace = "";
showApplicationIcons = true;
showWsIcons = true;
};
windowtitle.label = true;
volume.label = false;
network.truncation_size = 12;
bluetooth.label = false;
clock.format = "%a %b %d %I:%M %p";
notifications.show_total = true;
media.show_active_only = true;
customModules = {
updates.pollingInterval = 1440000;
cava = {
showIcon = false;
stereo = true;
showActiveOnly = true;
};
};
};
notifications = {
position = "top right";
showActionsOnHover = true;
};
menus = {
dashboard = {
shortcuts.enabled = false;
powermenu = {
confirmation = false;
avatar.image = "~/.face.icon";
};
directories = { };
};
power.lowBatteryNotification = true;
};
wallpaper.enable = false;
theme = {
font = {
name = font;
size = fontSizeForHyprpanel;
};
osd = {
enable = true;
orientation = "vertical";
location = "left";
radius = toString rounding + "px";
margins = "0px 0px 0px 10px";
muted_zero = true;
bar_color = accent;
bar_overflow_color = accent-alt;
icon = background;
icon_container = accent;
label = accent;
bar_container = background-alt;
};
notification = {
opacity = notificationOpacity;
enableShadow = true;
border_radius = toString rounding + "px";
background = background-alt;
actions = {
background = accent;
text = foreground;
};
label = accent;
border = background-alt;
text = foreground;
labelicon = accent;
close_button = {
background = background-alt;
label = "#f38ba8";
};
};
bar = {
outer_spacing = if floating && transparent then "0px" else "8px";
margin_top = (if position == "top" then toString (gaps-in * 2) else "0") + "px";
margin_bottom = (if position == "top" then "0" else toString (gaps-in * 2)) + "px";
margin_sides = toString gaps-out + "px";
border_radius = toString rounding + "px";
inherit transparent;
location = position;
dropdownGap = "4.5em";
inherit floating;
menus = {
inherit background;
cards = background-alt;
label = foreground;
text = foreground;
border.color = accent;
popover = {
text = foreground;
background = background-alt;
};
listitems.active = accent;
icons.active = accent;
switch.enabled = accent;
check_radio_button.active = accent;
buttons = {
default = accent;
active = accent;
};
iconbuttons.active = accent;
progressbar.foreground = accent;
slider.primary = accent;
tooltip = {
background = background-alt;
text = foreground;
};
dropdownmenu = {
background = background-alt;
text = foreground;
};
shadow = if transparent then "0 0 0 0" else "0px 0px 3px 1px #16161e";
monochrome = true;
card_radius = toString rounding + "px";
border = {
size = toString border-size + "px";
radius = toString rounding + "px";
};
menu.media = {
background.color = background-alt;
card = {
color = background-alt;
tint = 90;
};
};
};
background = background + (if transparentButtons && transparent then "00" else "");
buttons = {
workspaces = {
hover = accent-alt;
active = accent;
available = accent-alt;
occupied = accent-alt;
};
y_margins = if floating && transparent then "0px" else "8px";
spacing = "0.3em";
radius = (if transparent then toString rounding else toString (rounding - 8)) + "px";
padding_x = "0.8rem";
padding_y = "0.4rem";
style = "default";
monochrome = true;
text = if transparent && transparentButtons then foregroundOnWallpaper else foreground;
background =
(if transparent then background else background-alt) + (if transparentButtons then "00" else "");
icon = accent;
hover = lib.mkForce background;
notifications = {
hover = background;
total = accent;
icon = accent;
background = lib.mkForce background-alt;
};
};
};
};
};
};
}

View file

@ -0,0 +1,11 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [ hyprpaper ];
services.hyprpaper = {
enable = true;
settings = {
splash = false;
splash_offset = 2;
};
};
}

View file

@ -0,0 +1,25 @@
{
config,
pkgs,
...
}:
let
inherit (config.theme) colors;
font = config.stylix.fonts.serif.name;
font-size = config.stylix.fonts.sizes.popups;
in
{
home.packages = with pkgs; [ wofi-emoji ];
xdg.configFile."hypr/hyprtoolkit.conf".text = ''
background = 0x${colors.base00}
base = 0x${colors.base01}
alternate_base = 0x${colors.base02}
text = 0x${colors.base05}
bright_text = 0x${colors.base06}
accent = 0x${colors.base0D}
accent_secondary = 0x${colors.base0E}
font_family = ${font}
font_size = ${toString font-size}
'';
}

View file

@ -0,0 +1,24 @@
{
wayland.windowManager.hyprland.settings = {
cursor = {
no_hardware_cursors = true;
hide_on_touch = true;
inactive_timeout = 0;
};
input = {
kb_layout = "us,ru";
kb_options = "altwin:swap_alt_win,grp:caps_toggle";
follow_mouse = 1;
sensitivity = 0.5;
repeat_delay = 300;
repeat_rate = 50;
numlock_by_default = true;
touchpad = {
natural_scroll = true;
clickfinger_behavior = true;
};
};
};
}

View file

@ -0,0 +1,7 @@
{
wayland.windowManager.hyprland.settings = {
windowrule = [
"match:class .*, suppress_event maximize"
];
};
}