lock update and temporary linux-firmware fix

This commit is contained in:
2025-06-22 21:02:30 +02:00
parent 1aa82872bd
commit 4b71da350f
16 changed files with 91 additions and 646 deletions

View File

@@ -1,63 +0,0 @@
{
lib,
config,
...
}: let
inherit (lib) mkIf mkEnableOption;
cfg = config.home.programs.hyprland;
in {
options = {
home.programs.hyprland.appearance.enable = mkEnableOption "Enables appearance settings in Hyprland";
};
config = mkIf cfg.appearance.enable {
wayland.windowManager.hyprland.settings = {
general = {
gaps_in = 2;
gaps_out = "4, 4, 4, 4";
border_size = 3;
#col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg
#col.inactive_border = rgba(595959aa)
"col.active_border" = "rgb(4c7a5d)"; # rgba(b16286ee) 45deg
"col.inactive_border" = "rgb(504945)";
layout = "dwindle";
resize_on_border = true;
};
decoration = {
rounding = 0;
blur = {
enabled = true;
brightness = 1.0;
contrast = 1.0;
noise = 0.01;
vibrancy = 0.15;
vibrancy_darkness = 0.5;
passes = 1;
size = 3;
popups = true;
popups_ignorealpha = 0.2;
};
shadow = {
enabled = false;
color = "rgba(00000025)";
ignore_window = true;
offset = "0 5";
range = 45;
render_power = 2;
scale = 0.95;
};
};
animations.enabled = true;
animation = [
"border, 1, 2, default"
"fade, 1, 4, default"
"windows, 1, 3, default, popin 80%"
"workspaces, 1, 2, default, slide"
];
dwindle = {
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
pseudotile = true; # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
preserve_split = true; # you probably want this
};
};
};
}

View File

@@ -1,48 +0,0 @@
{
config,
lib,
pkgs,
inputs,
...
}: let
inherit (lib) mkIf mkEnableOption mkDefault;
cfg = config.home.programs.hyprland;
hyprlandPkg = inputs.hyprland.packages.${pkgs.system}.default;
in {
imports = [
./appearance.nix
./inputs.nix
./keybinds.nix
./rules.nix
./startup.nix
];
options = {
home.programs.hyprland = {
enable = mkEnableOption "Enable Hyprland";
};
};
config = mkIf cfg.enable {
home.programs.hyprland = {
appearance.enable = mkDefault true;
inputs.enable = mkDefault true;
keybinds.enable = mkDefault true;
rules.enable = mkDefault true;
startup.enable = mkDefault true;
};
wayland.windowManager.hyprland = {
enable = true;
package = hyprlandPkg;
systemd = {
enable = false;
variables = ["--all"];
extraCommands = [
"systemctl --user stop graphical-session.target"
"systemctl --user start hyprland-session.target"
];
};
};
};
}

View File

@@ -1,135 +0,0 @@
{
lib,
config,
osConfig,
...
}: let
inherit (lib) mkIf mkEnableOption mkMerge;
cfg = config.home.programs.hyprland;
host = osConfig.networking.hostName;
in {
options = {
home.programs.hyprland.inputs.enable = mkEnableOption "Enables input settings in Hyprland";
};
config = mkIf cfg.inputs.enable (mkMerge [
{
wayland.windowManager.hyprland.settings = {
monitor =
map (
m: "${m.name},${
if m.enabled
then "${toString m.width}x${toString m.height}@${toString m.refreshRate},${m.position},${toString m.scale},transform,${toString m.transform}${
if m.bitDepth != null
then ",bitdepth,${toString m.bitDepth}"
else ""
}"
else "disable"
}"
)
config.monitors;
workspace = map (
m: "name:${m.workspace},monitor:${m.name}"
) (lib.filter (m: m.enabled && m.workspace != null) config.monitors);
env = [
"QT_WAYLAND_DISABLE_WINDOWDECORATION,1"
];
input = {
kb_layout = "se";
kb_variant = "nodeadkeys";
follow_mouse = 1;
accel_profile = "flat";
sensitivity = 0; # -1.0 - 1.0, 0 means no modification.
touchpad = {
natural_scroll = true;
disable_while_typing = true;
clickfinger_behavior = true;
scroll_factor = 0.5;
};
};
gestures = {
workspace_swipe = true;
workspace_swipe_distance = 400;
workspace_swipe_fingers = 3;
workspace_swipe_cancel_ratio = 0.2;
workspace_swipe_min_speed_to_force = 5;
workspace_swipe_direction_lock = true;
workspace_swipe_direction_lock_threshold = 10;
workspace_swipe_create_new = true;
};
misc = {
mouse_move_enables_dpms = 1;
key_press_enables_dpms = 0;
force_default_wallpaper = 0;
disable_hyprland_logo = true;
disable_splash_rendering = true;
disable_autoreload = true;
disable_xdg_env_checks = true;
layers_hog_keyboard_focus = false;
};
xwayland = {
force_zero_scaling = false;
};
};
}
(mkIf (host == "cnix") {
wayland.windowManager.hyprland.settings = {
render = {
explicit_sync = 2;
explicit_sync_kms = 2;
direct_scanout = false;
};
cursor = {
no_hardware_cursors = 2;
};
general = {
allow_tearing = false;
};
misc = {
vrr = 0;
};
};
})
(mkIf (host == "cnixpad") {
wayland.windowManager.hyprland.settings = {
input = {
kb_options = "ctrl:swapcaps";
};
general = {
allow_tearing = false;
};
misc = {
vrr = 0;
vfr = 1;
};
};
})
(mkIf (host == "toothpc") {
wayland.windowManager.hyprland.settings = {
render = {
explicit_sync = 0;
explicit_sync_kms = 0;
direct_scanout = false;
};
cursor = {
no_hardware_cursors = true;
};
general = {
allow_tearing = false;
};
misc = {
vrr = 0;
};
};
})
]);
}

View File

@@ -1,130 +0,0 @@
{
lib,
config,
osConfig,
...
}: let
inherit (lib) mkIf mkEnableOption mkMerge;
cfg = config.home.programs.hyprland;
host = osConfig.networking.hostName;
toggle = program: let
prog = builtins.substring 0 14 program;
in "pkill ${prog} || uwsm app -- ${program}";
runOnce = program: "pgrep ${program} || uwsm app -- ${program}";
in {
options = {
home.programs.hyprland.keybinds.enable = mkEnableOption "Enables keybind settings in Hyprland";
};
config = mkIf cfg.keybinds.enable (mkMerge [
{
wayland.windowManager.hyprland.settings = {
# Common Keybind Variables
"$fileManager" = "thunar";
"$yazi" = "foot -e yazi";
"$launcher" = "fuzzel";
bind = [
"$mod, SPACE, exec, $launcher"
"$mod, R, exec, $launcher"
"$mod, L, exec, ${toggle "nwg-bar"}"
"$mod SHIFT, B, exec, pkill -SIGUSR2 waybar"
"$mod, A, exec, pkill -SIGUSR1 waybar"
"$mod, T, exec, $terminal"
"$mod, W, exec, $browser"
"$mod, K, exec, keepassxc"
"$mod SHIFT, W, exec, $browserinc"
"$mod, Q, killactive,"
"$mod, E, exec, $fileManager"
"$mod SHIFT, E, exec, $yazi"
"$mod, F, fullscreen,"
"$mod SHIFT, F, togglefloating,"
"$mod, P, pseudo,"
"$mod, J, togglesplit,"
"$mod, C, exec, hyprctl dispatch exec copyq toggle"
"$mod, left, movefocus, l"
"$mod, right, movefocus, r"
"$mod, up, movefocus, u"
"$mod, down, movefocus, d"
"$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, 0, workspace, 10"
"$mod SHIFT, 1, movetoworkspace, 1"
"$mod SHIFT, 2, movetoworkspace, 2"
"$mod SHIFT, 3, movetoworkspace, 3"
"$mod SHIFT, 4, movetoworkspace, 4"
"$mod SHIFT, 5, movetoworkspace, 5"
"$mod SHIFT, 6, movetoworkspace, 6"
"$mod SHIFT, 7, movetoworkspace, 7"
"$mod SHIFT, 8, movetoworkspace, 8"
"$mod SHIFT, 9, movetoworkspace, 9"
"$mod SHIFT, 0, movetoworkspace, 10"
",XF86AudioLowerVolume, exec, volume-control.sh --dec"
",XF86AudioRaiseVolume, exec, volume-control.sh --inc"
",XF86AudioMute, exec, volume-control.sh --toggle"
",XF86AudioMicMute, exec, volume-control.sh --toggle-mic"
",XF86MonBrightnessDown, exec, brightnessctl s 5%-"
",XF86MonBrightnessUp, exec, brightnessctl s +5%"
"$mod, XF86MonBrightnessUp, exec, hyprctl dispatch dpms on"
"$mod, XF86MonBrightnessDown, exec, hyprctl dispatch dpms off"
",Insert, exec, ${runOnce "grimblast"} --notify --freeze copysave area"
"SHIFT, Insert, exec, ${runOnce "grimblast"} --notify --freeze copysave output"
"ALT, Insert, exec, ${runOnce "grimblast"} --freeze save area - | ${runOnce "tesseract"} - - | wl-copy && ${runOnce "notify-send"} -t 3000 'OCR result copied to buffer'"
];
bindm = [
"$mod, mouse:272, movewindow"
"$mod, mouse:273, resizewindow"
];
};
}
(mkIf (host == "cnix") {
wayland.windowManager.hyprland.settings = {
"$terminal" = "ghostty";
"$browser" = "zen";
"$browserinc" = "zen --private-window";
"$mod" = "SUPER";
bind = [
# Add more host-specific binds as needed
];
};
})
(mkIf (host == "cnixpad") {
wayland.windowManager.hyprland.settings = {
"$terminal" = "foot";
"$browser" = "zen";
"$browserinc" = "zen --private-window";
"$mod" = "ALT_L";
bind = [
# Add more host-specific binds as needed
];
};
})
(mkIf (host == "toothpc") {
wayland.windowManager.hyprland.settings = {
"$terminal" = "alacritty";
"$browser" = "firefox";
"$browserinc" = "firefox --private-window";
"$mod" = "ALT_L";
bind = [
# Add more host-specific binds as needed
];
};
})
]);
}

View File

@@ -1,92 +0,0 @@
{
lib,
config,
...
}: let
inherit (lib) mkIf mkEnableOption;
cfg = config.home.programs.hyprland.rules;
in {
options = {
home.programs.hyprland.rules.enable = mkEnableOption "Enables window rule settings in Hyprland";
};
config = mkIf cfg.enable {
wayland.windowManager.hyprland.settings = {
windowrulev2 = [
# === CALCURSE SETTINGS ===
"size 843 650, initialTitle:^(floatcal)$"
"move 100%-w-20 40, initialTitle:^(floatcal)$"
"float, initialTitle:^(floatcal)$"
# === TUIRUN SETTINGS ===
"size 600 300, title:^(tuirun)$"
"center, title:^(tuirun)$"
# "workspace special:tuirun, initialTitle:^(tuirun)$"
"noborder, title:^(tuirun)$"
"float, title:^(tuirun)$"
# === KEEPASSXC SETTINGS ===
"size 843 530, class:^(org.keepassxc.KeePassXC)$"
"move 100%-w-20 40, class:^(org.keepassxc.KeePassXC)$"
"float, class:^(org.keepassxc.KeePassXC)$"
# === SUPPRESS MAXIMIZE EVENT ===
"suppressevent maximize, class:.*" # Suppress maximize events for all windows
# === NWG-LOOK SETTINGS ===
"center, class:^(nwg-look)$"
"float, class:^(nwg-look)$"
# === OCULANTE SETTINGS ===
"center, class:^(oculante)$"
"float, class:^(oculante)$"
# === PAVUCONTROL SETTINGS ===
"move 100%-w-20 40, class:^(pavucontrol)$"
"size 741 585, class:^(pavucontrol)$"
"float, class:^(pavucontrol)$"
# === XARCHIVER SETTINGS ===
"center, class:^(xarchiver)$"
"float, class:^(xarchiver)$"
# === FLOATING APPLICATIONS ===
"float, class:^(org.gnome.FileRoller)$"
"float, class:^(org.freedesktop.impl.portal.desktop.kde)$"
"float, class:^(org.corectrl.CoreCtrl)$"
"float, class:^(feh)$"
"float, class:^(polkit-gnome-authentication-agent-1)$"
"float, class:^(org.gnome.Calculator)$"
"float, class:^(com.github.hluk.copyq)$"
"float, class:^(blueman-manager)$"
# === WORKSPACE RULES ===
"workspace 5 silent, class:^(discord)$"
];
windowrule = [];
workspace = [
"name:2,monitor:DP-3"
"name:3,monitor:DP-3"
"name:4,monitor:DP-3"
"name:6,monitor:DP-3"
"name:7,monitor:DP-3"
"name:8,monitor:DP-3"
"name:9,monitor:DP-3"
"name:10,monitor:DP-3"
];
layerrule = [
"animation fade,hyprpicker"
"animation fade,selection"
"noanim,waybar"
"ignorezero,waybar"
"ignorealpha 0.0,waybar"
"blur,notifications"
"ignorezero,notifications"
"noanim,wallpaper"
];
};
};
}

View File

@@ -1,54 +0,0 @@
{
lib,
config,
osConfig,
...
}: let
inherit (lib) mkIf mkEnableOption mkMerge;
cfg = config.home.programs.hyprland;
host = osConfig.networking.hostName;
in {
options = {
home.programs.hyprland.startup.enable = mkEnableOption "Enables startup settings in Hyprland";
};
config = mkIf cfg.startup.enable (mkMerge [
{
wayland.windowManager.hyprland.settings = {
exec-once = [
"sleep 2 && uwsm finalize"
"hyprlock"
];
};
}
(mkIf (host == "cnix") {
wayland.windowManager.hyprland.settings.exec-once = [
"uwsm app -- mullvad-vpn"
"uwsm app -- blueman-applet"
"uwsm app -- keepassxc"
"uwsm app -- pamixer --set-volume 50"
"uwsm app -- solaar -w hide -b regular"
"uwsm app -- nm-applet --indicator"
];
})
(mkIf (host == "cnixpad") {
wayland.windowManager.hyprland.settings.exec-once = [
"uwsm app -- blueman-applet"
"uwsm app -- keepassxc"
"uwsm app -- pamixer --set-volume 50"
"uwsm app -- nm-applet --indicator"
];
})
(mkIf (host == "toothpc") {
wayland.windowManager.hyprland.settings.exec-once = [
"uwsm app -- mullvad-vpn"
"uwsm app -- keepassxc"
"uwsm app -- solaar -w hide -b regular"
"uwsm app -- nm-applet --indicator"
];
})
]);
}