diff --git a/desktop-environment.nix b/desktop-environment.nix index 597586d..c914401 100644 --- a/desktop-environment.nix +++ b/desktop-environment.nix @@ -2,6 +2,7 @@ { programs.hyprland = { enable = true; + withUWSM = true; xwayland.enable = true; }; @@ -41,24 +42,6 @@ extraPortals = [ pkgs.xdg-desktop-portal-hyprland ]; }; - systemd.user.services.hyprland-config = { - description = "Hyprland config synchronization."; - serviceConfig = { - Type = "oneshot"; - ExecStart = '' - HYPR="$HOME/.config/hypr" - if [ ! -d "$HYPR/.git" ]; then - git clone ssh://git@git.nichkara.eu/dotfiles/hypr.git "$HYPR" - else - git -C "$HYPR" pull --ff-only - fi - CONF="$HOME/.config" - $HYPR/pure_setup.sh - ''; - }; - wantedBy = [ "default.target" ]; - }; - hardware.nvidia = { modesetting.enable = true; powerManagement.enable = false; diff --git a/home-manager.nix b/home-manager.nix new file mode 100644 index 0000000..2792b06 --- /dev/null +++ b/home-manager.nix @@ -0,0 +1,26 @@ +{ config, pkgs, lib, ... }: + +let + home-manager = builtins.fetchTarball https://github.com/nix-community/home-manager/archive/release-25.05.tar.gz; +in +{ + imports = + [ + (import "${home-manager}/nixos") + ./home/hypr/hyprland.nix + ]; + + users.users.nichkara.isNormalUser = true; + home-manager.users.nichkara = { pkgs, ... }: { + home.packages = [ pkgs.atool pkgs.httpie ]; + home.username = "nichkara"; + home.homeDirectory = "/home/nichkara"; + programs.zsh.enable = true; + programs.home-manager.enable = true; + + # The state version is required and should stay at the version you + # originally installed. + home.stateVersion = "25.05"; + }; + home-manager.backupFileExtension = "backup"; +} diff --git a/home/hypr/config/keymaps.nix b/home/hypr/config/keymaps.nix new file mode 100644 index 0000000..db39706 --- /dev/null +++ b/home/hypr/config/keymaps.nix @@ -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 + ''; + + + + + }; + +} diff --git a/home/hypr/hyprland.nix b/home/hypr/hyprland.nix new file mode 100644 index 0000000..c53d9be --- /dev/null +++ b/home/hypr/hyprland.nix @@ -0,0 +1,6 @@ +{ config, pkgs, lib, ... }: +{ + imports = [ + ]; + +}