Add structure for home-manager to nix

This commit is contained in:
2026-02-14 10:08:23 +01:00
parent dbe24d8866
commit 4a3e8ad43e
4 changed files with 157 additions and 18 deletions

View File

@@ -0,0 +1,124 @@
{ config, pkgs, lib, ... }:
{
wayland.windowManager.hyprland = {
settings = {
"$terminal" = "kitty";
"$fileManager" = "dolphin";
"$menu" = "rofi -show drun -show-icons";
"$editor" = "kate";
"$browser" = "vivaldi";
"$mainMod" = "SUPER";
bind = [
"$mainMod, Q, exec, kitty"
"$mainMod, E, exec, $fileManager"
"$mainMod, K, exec, $editor"
"$mainMod, B, exec, $browser"
"$mainMod, S, exec, $menu"
"$mainMod ALT, E, exec, dolphin /run/media/skadi/Volume/Dokumente"
# Util
"$mainMod, C, killactive,"
"$mainMod, M, exit,"
"$mainMod, V, togglefloating,"
"$mainMod, P, pseudo" #dwindle
"$mainMod, J, togglesplit" #dwindle
"$mainMod, L, exec, ~/.config/home-manager/hypr/wallpaper.sh"
"$mainMod, H, exec, cliphist list | rofi -dmenu | cliphist decode | wl-copy"
", PRINT, exec, hyprshot -m region"
"$mainMod, PRINT, exec, hyprshot -m window"
# Move focus with mainMod + arrow keys
"$mainMod, left, movefocus, l"
"$mainMod, right, movefocus, r"
"$mainMod, up, movefocus, u"
"$mainMod, down, movefocus, d"
# Switch workspaces with mainMod + [0-9]
"$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 active window to a workspace with mainMod + SHIFT + [0-9]
"$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"
];
#mouse keys
bindm = [
# Move/resize windows with mainMod + LMB/RMB and dragging
"$mainMod, mouse:272, movewindow"
"$mainMod, mouse:273, resizewindow"
];
#laptop keys
bindl = [
",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"
];
};
# Submaps
extraConfig = ''
# Resize
bind = ALT, R, submap, Resize
submap = Resize
binde = , right, resizeactive, 10 0
binde = , left, resizeactive, -10 0
binde = , up, resizeactive, 0 -10
binde = , down, resizeactive, 0 10
# escape the submap
bind = , escape, submap, reset
submap = reset
# Move
bind = ALT, T, submap, Move
submap = Move
bindm = , mouse:272, movewindow
bindm = , mouse:273, resizewindow
bind = , escape, submap, reset
submap = reset
# Close
bind = ALT, Z, submap, Close
submap = Close
bind = , C, killactive,
bind = , escape, submap, reset
submap = reset
'';
};
}

6
home/hypr/hyprland.nix Normal file
View File

@@ -0,0 +1,6 @@
{ config, pkgs, lib, ... }:
{
imports = [
];
}