Initial commit

This commit is contained in:
demenik
2025-12-01 18:24:34 +01:00
commit fc68fa5ce9
142 changed files with 6273 additions and 0 deletions

21
home/desktops/global.nix Normal file
View File

@@ -0,0 +1,21 @@
{
pkgs,
inputs,
...
}: {
home = {
sessionVariables = {
GTK_USE_PORTAL = "1";
NIXOS_OZONE_WL = "1";
QT_SCALE_FACTOR = "1";
DISABLE_QT5_COMPAT = "0";
_JAVA_AWT_WM_NONREPARENTING = "1";
QT_AUTO_SCREEN_SCALE_FACTOR = "1";
};
};
qt = {
enable = true;
platformTheme.name = "qtct";
};
}

View File

@@ -0,0 +1,2 @@
[
]

View File

@@ -0,0 +1,5 @@
# hyprlang
''
bind = SUPER, b, exec, [workspace 2] firefox
bind = SUPER, Return, exec, kitty-cwd
''

View File

@@ -0,0 +1,57 @@
{pkgs, ...}: {
wayland.windowManager.hyprland = {
settings = {
bind = let
numbers = [1 2 3 4 5 6 7 8 9];
workspace = num: "SUPER, ${toString num}, workspace, ${toString num}";
move-to-workspace = num: "SUPER SHIFT, ${toString num}, movetoworkspace, ${toString num}";
in
[
"SUPER SHIFT, q, exit"
"SUPER, x, killactive"
"SUPER, t, togglefloating"
"SUPER SHIFT, p, pin"
"SUPER, f, fullscreen, 0"
"SUPER, m, fullscreen, 1"
"SUPER SHIFT, f, fullscreenstate, -1 2"
"SUPER, 0, workspace, 10"
"SUPER SHIFT, 0, movetoworkspace, 10"
]
++ map move-to-workspace numbers
++ map workspace numbers;
bindm = [
"SUPER, mouse:272, movewindow"
"SUPER, mouse:273, resizewindow"
];
binde = let
volume-value = 5;
brightness-value = 5;
volume-cmd = "wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ ${toString volume-value}%";
in [
",XF86MonBrightnessUp, exec, light -A ${toString brightness-value}"
",XF86MonBrightnessDown, exec, light -U ${toString brightness-value}"
# TODO: these dont work on the ThinkPad
",XF86AudioRaiseVolume, exec, ${volume-cmd}+"
",XF86AudioLowerVolume, exec, ${volume-cmd}-"
",XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
",XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"
];
bindl = [
",XF86AudioPlay, exec, playerctl play-pause"
",XF86AudioNext, exec, playerctl next"
",XF86AudioPrev, exec, playerctl previous"
];
};
extraConfig = import ./vim-binds.nix + import ./app-binds.nix;
};
services.playerctld.enable = true;
home.packages = with pkgs; [light];
}

View File

@@ -0,0 +1,27 @@
# hyprlang
''
bind = SUPER, h, bringactivetotop
bind = SUPER, j, bringactivetotop
bind = SUPER, k, bringactivetotop
bind = SUPER, l, bringactivetotop
bind = SUPER, h, movefocus, l
bind = SUPER, j, movefocus, d
bind = SUPER, k, movefocus, u
bind = SUPER, l, movefocus, r
bind = SUPER ALT, h, swapwindow, l
bind = SUPER ALT, j, swapwindow, d
bind = SUPER ALT, k, swapwindow, u
bind = SUPER ALT, l, swapwindow, r
bind = SUPER CTRL, h, moveactive, l
bind = SUPER CTRL, j, moveactive, d
bind = SUPER CTRL, k, moveactive, u
bind = SUPER CTRL, l, moveactive, r
bind = SUPER SHIFT, h, resizeactive, -20 0
bind = SUPER SHIFT, j, resizeactive, 0 20
bind = SUPER SHIFT, k, resizeactive, 0 -20
bind = SUPER SHIFT, l, resizeactive, 20 0
''

View File

@@ -0,0 +1,75 @@
{pkgs, ...}: {
imports = [
../global.nix
../wayland.nix
./binds
./hyprlock.nix
./dunst.nix
];
home.packages = with pkgs; [
hyprland
hyprshade
xdg-desktop-portal-hyprland
xdg-desktop-portal-gtk
];
wayland.windowManager.hyprland = {
enable = true;
systemd.enable = true;
xwayland.enable = true;
settings = let
rules = import ./rules.nix;
in {
monitor = [",preferred,auto,1"];
misc.disable_hyprland_logo = true;
misc.focus_on_activate = true;
xwayland.force_zero_scaling = true;
layerrule = rules.layer;
windowrulev2 = rules.window;
inherit (rules) workspace;
input = {
kb_layout = "de";
kb_variant = "nodeadkeys";
repeat_delay = 300;
touchpad = {
natural_scroll = true;
clickfinger_behavior = true;
disable_while_typing = false;
};
};
general = {
gaps_in = 5;
gaps_out = 5;
border_size = 2;
layout = "master";
};
decoration = {
rounding = 8;
blur = {
size = 4;
passes = 3;
};
dim_around = 0.6;
};
animation = import ./animations.nix;
};
};
services.hypridle = import ./hypridle.nix;
home.sessionVariables = {
XDG_SESSION_DESKTOP = "Hyprland";
XDG_CURRENT_DESKTOP = "Hyprland";
};
}

View File

@@ -0,0 +1,45 @@
{config, ...}: {
services.dunst = {
enable = true;
iconTheme = {
name = config.stylix.icons.dark;
inherit (config.stylix.icons) package;
};
settings = let
inherit (config.lib.stylix) colors;
in {
global = {
width = 400;
offset = "5x5";
corner_radius = 4;
progress_bar_min_width = 380;
progress_bar_max_width = 380;
progress_bar_corner_radius = 8;
padding = 10;
horizontal_padding = 10;
frame_width = 1;
gap_size = 3;
};
urgency_low = {
format = "<b><span>%s</span></b>\n%b";
};
urgency_normal = {
highlight = colors.base0A;
default_icon = "dialog-information";
format = "<b><span>%s</span></b>\n%b";
};
urgency_critical = {
highlight = colors.base08;
default_icon = "dialog-error";
format = "<b><span>%s</span></b>\n%b";
};
};
};
}

View File

@@ -0,0 +1,32 @@
{
enable = true;
settings = {
general = {
lock_cmd = "pidof hyprlock || hyprlock";
before_sleep_cmd = "hyprlock";
after_sleep_cmd = "hyprctl dispatch dpms on";
};
listener = [
{
timeout = 300; # 5min
on-timeout = "light -S 10";
on-resume = "brightnessctl -r";
}
{
timeout = 150; # 2.5min
on-timeout = "brightnessctl -sd rgb:kbd_backlight set 0";
on-resume = "brightnessctl -rd rgb:kbd_backlight";
}
{
timeout = 600; # 10min
on-timeout = "hyprlock";
}
{
timeout = 900; # 15min
on-timeout = "hyprctl dispatch dpms off";
on-resume = "hyprctl dispatch dpms on";
}
];
};
}

View File

@@ -0,0 +1,107 @@
{
config,
lib,
...
}: {
programs.hyprlock = {
enable = true;
settings = let
profilePhoto = "$HOME/Pictures/pfp/bladee/egobaby.jpg";
wallpaper = "$HOME/Pictures/wallpapers/takopi/class.png";
font_family = config.stylix.fonts.sansSerif.name;
inherit (config.lib.stylix) colors;
text = colors.base05;
yellow = colors.base0A;
accent = colors.base0D;
in {
authentication.fingerprint.enabled = true;
background = {
monitor = "";
path = wallpaper;
blur_passes = 0;
blur_size = 8;
};
general = {
hide_cursor = true;
ignore_empty_input = true;
};
input-field = {
monitor = "";
size = "250, 60";
position = "0, -225";
outline_thickness = 2;
dots_size = 0.2;
dots_spacing = 0.2;
dots_center = true;
outer_color = lib.mkForce "rgba(0, 0, 0, 0)";
inner_color = lib.mkForce "rgba(100, 114, 125, 0.4)";
font_color = lib.mkForce "rgb(${text})";
fade_on_empty = false;
inherit font_family;
placeholder_text = "<span foreground=\"##${text}99\"><i>󰌾 Login as </i><span foreground=\"##${accent}ff\">$USER</span></span>";
fail_text = "<i>$FAIL <b>($ATTEMPTS)</b></i>";
capslock_color = "rgb(${yellow})";
check_color = lib.mkForce "rgb(${accent})";
};
label = [
# Layout
{
monitor = "";
text = "Layout: $LAYOUT";
color = "#rgb(${text})";
font_size = 12;
inherit font_family;
position = "30, -30";
halign = "left";
valign = "top";
}
# Time
{
monitor = "";
text = "cmd[update:1000] echo \"$(date +\"%H:%M\")\"";
color = "rgb(${text})";
font_size = 130;
inherit font_family;
position = "0, 240";
}
# Day-Month
{
monitor = "";
text = "cmd[update:43200000] echo -e \"$(date +\"%A, %d. %B %Y\")\"";
color = "rgb(${text})";
font_size = 30;
inherit font_family;
position = "0, 105";
}
# Fingerprint
{
monitor = "";
text = "$FPRINTPROMPT";
color = "rgb(${text})";
font_size = 14;
inherit font_family;
position = "0, -130";
}
];
# image = [
# # Profile Photo
# {
# monitor = "";
# path = profilePhoto;
# border_size = 0;
# size = 120;
# rounding = -1;
# rotate = 0;
# position = "0, -20";
# }
# ];
};
};
}

View File

@@ -0,0 +1,18 @@
{
layer = [];
window =
[
"float, class:^(hyprland-share-picker)$"
"workspace 3, class:^(Electron)$, title:^(BSC)$" # BetterSoundCloud
"workspace 3, class:^(opensoundcloud)$"
]
++ map (rule: "${rule}, class:^(xdg-desktop-portal-gtk)$") [
"float"
"size 800 600"
"center 1"
"dimaround"
];
workspace = [];
}

22
home/desktops/wayland.nix Normal file
View File

@@ -0,0 +1,22 @@
{pkgs, ...}: {
imports = [
./global.nix
];
home = {
packages = with pkgs; [
wl-clipboard
];
sessionVariables = {
GDK_BACKEND = "wayland";
QT_QPA_PLATFORM = "wayland";
CLUTTER_BACKEND = "wayland";
SDL_VIDEODRIVER = "wayland";
XDG_SESSION_TYPE = "wayland";
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
};
};
services.clipman.enable = true;
}