diff --git a/common/desktop-node.nix b/common/desktop-node.nix index 69725d0..4ba8d0a 100644 --- a/common/desktop-node.nix +++ b/common/desktop-node.nix @@ -37,12 +37,15 @@ fira-code-symbols ]; - # Enable GDM for login (can also use greetd or ly for lighter options) + # Enable greetd with tuigreet for login services.greetd = { enable = true; settings = { default_session = { - command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd Hyprland"; + command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --remember --remember-session --sessions ${pkgs.writeText "sessions" '' + Hyprland:Hyprland + Console:fish + ''}"; user = "greeter"; }; }; diff --git a/home/default.nix b/home/default.nix index b43817c..6c9b243 100644 --- a/home/default.nix +++ b/home/default.nix @@ -43,5 +43,5 @@ }; }; - programs = import ./programs.nix { inherit pkgs; }; + programs = import ./programs/${profile}.nix { inherit pkgs; }; } diff --git a/home/profiles/desktop.nix b/home/profiles/desktop.nix index f97f9ac..a0fe45f 100644 --- a/home/profiles/desktop.nix +++ b/home/profiles/desktop.nix @@ -5,6 +5,7 @@ let desktopPkgs = with pkgs; [ unstable.chromium foot # Wayland-native terminal emulator + wofi # Application launcher for Wayland ]; in { diff --git a/home/programs/desktop.nix b/home/programs/desktop.nix new file mode 100644 index 0000000..c1165c9 --- /dev/null +++ b/home/programs/desktop.nix @@ -0,0 +1,133 @@ +{ pkgs, ... }: +{ + imports = [ ./workstation.nix ]; + + # Hyprland window manager configuration + wayland.windowManager.hyprland = { + enable = true; + settings = { + # Remap CapsLock to Super (Mod4) + "$mod" = "SUPER"; + + input = { + kb_options = "caps:super"; + follow_mouse = 1; + touchpad = { + natural_scroll = false; + }; + sensitivity = 0; + }; + + general = { + gaps_in = 5; + gaps_out = 10; + border_size = 2; + "col.active_border" = "rgba(33ccffee) rgba(00ff99ee) 45deg"; + "col.inactive_border" = "rgba(595959aa)"; + layout = "dwindle"; + }; + + decoration = { + rounding = 5; + blur = { + enabled = true; + size = 3; + passes = 1; + }; + drop_shadow = true; + shadow_range = 4; + shadow_render_power = 3; + "col.shadow" = "rgba(1a1a1aee)"; + }; + + animations = { + enabled = true; + bezier = "myBezier, 0.05, 0.9, 0.1, 1.05"; + animation = [ + "windows, 1, 7, myBezier" + "windowsOut, 1, 7, default, popin 80%" + "border, 1, 10, default" + "borderangle, 1, 8, default" + "fade, 1, 7, default" + "workspaces, 1, 6, default" + ]; + }; + + dwindle = { + pseudotile = true; + preserve_split = true; + }; + + master = { + new_status = "master"; + }; + + gestures = { + workspace_swipe = false; + }; + + misc = { + force_default_wallpaper = 0; + }; + + # Key bindings + bind = [ + # Application launchers + "$mod, Q, exec, foot" + "$mod, D, exec, wofi --show drun" + "$mod SHIFT, D, exec, wofi --show run" + "$mod, C, killactive," + "$mod SHIFT, E, exit," + "$mod, V, togglefloating," + "$mod, P, pseudo," + "$mod, J, togglesplit," + + # Move focus with mod + arrow keys + "$mod, left, movefocus, l" + "$mod, right, movefocus, r" + "$mod, up, movefocus, u" + "$mod, down, movefocus, d" + + # Move focus with mod + hjkl (vim-style) + "$mod, h, movefocus, l" + "$mod, l, movefocus, r" + "$mod, k, movefocus, u" + "$mod, j, movefocus, d" + + # Switch workspaces with mod + [0-9] + "$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" + + # Move active window to a workspace with mod + SHIFT + [0-9] + "$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" + + # Scroll through existing workspaces with mod + scroll + "$mod, mouse_down, workspace, e+1" + "$mod, mouse_up, workspace, e-1" + ]; + + # Mouse bindings + bindm = [ + "$mod, mouse:272, movewindow" + "$mod, mouse:273, resizewindow" + ]; + }; + }; +} diff --git a/home/programs.nix b/home/programs/server.nix similarity index 100% rename from home/programs.nix rename to home/programs/server.nix diff --git a/home/programs/workstation.nix b/home/programs/workstation.nix new file mode 100644 index 0000000..415ab47 --- /dev/null +++ b/home/programs/workstation.nix @@ -0,0 +1,6 @@ +{ pkgs, ... }: +{ + imports = [ ./server.nix ]; + + # Add workstation-specific programs here if needed in the future +}