diff options
| author | Natasha Moongrave <natasha@256phi.eu> | 2026-02-02 19:33:21 +0100 |
|---|---|---|
| committer | Natasha Moongrave <natasha@256phi.eu> | 2026-02-02 19:33:21 +0100 |
| commit | 9695c1c909be4d48854690cdf47958551c2d3178 (patch) | |
| tree | 71b8bd7fb405d7099bb00f31649b2b074c8c3f30 | |
| parent | efd43899305e40f7dc8248409cb629009ecaa8ac (diff) | |
removed hyprland, added niri
| -rwxr-xr-x | configuration.nix | 2 | ||||
| -rw-r--r-- | modules/home/default.nix | 9 | ||||
| -rw-r--r-- | modules/home/hyprland/chernobyl/hyprland.nix | 174 | ||||
| -rw-r--r-- | modules/home/hyprland/default.nix | 10 | ||||
| -rw-r--r-- | modules/home/niri/chernobyl/default.nix (renamed from modules/home/hyprland/chernobyl/default.nix) | 4 | ||||
| -rw-r--r-- | modules/home/niri/chernobyl/dunst.nix (renamed from modules/home/hyprland/chernobyl/dunst.nix) | 2 | ||||
| -rw-r--r-- | modules/home/niri/chernobyl/fastfetch.nix (renamed from modules/home/hyprland/chernobyl/fastfetch.nix) | 0 | ||||
| -rw-r--r-- | modules/home/niri/chernobyl/kitty.nix (renamed from modules/home/hyprland/chernobyl/kitty.nix) | 2 | ||||
| -rw-r--r-- | modules/home/niri/chernobyl/niri.nix | 126 | ||||
| -rw-r--r-- | modules/home/niri/chernobyl/rofi.nix (renamed from modules/home/hyprland/chernobyl/rofi.nix) | 11 | ||||
| -rw-r--r-- | modules/home/niri/chernobyl/waybar.nix (renamed from modules/home/hyprland/chernobyl/waybar.nix) | 0 | ||||
| -rw-r--r-- | modules/home/niri/default.nix | 10 | ||||
| -rw-r--r-- | modules/nixos/des/niri.nix (renamed from modules/nixos/des/hyprland.nix) | 7 | ||||
| -rwxr-xr-x | mun.nix | 2 |
14 files changed, 154 insertions, 205 deletions
diff --git a/configuration.nix b/configuration.nix index 7948cc2..23d3861 100755 --- a/configuration.nix +++ b/configuration.nix @@ -8,7 +8,7 @@ # === Environment Choice === # Uncomment one of the following to select your environment: #./modules/nixos/des/i3wm.nix - ./modules/nixos/des/hyprland.nix + ./modules/nixos/des/niri.nix ]; } diff --git a/modules/home/default.nix b/modules/home/default.nix new file mode 100644 index 0000000..b01613e --- /dev/null +++ b/modules/home/default.nix @@ -0,0 +1,9 @@ +{ ... }: + +{ + # Home environment orchestrator + imports = [ + ./i3wm + ./niri + ]; +} diff --git a/modules/home/hyprland/chernobyl/hyprland.nix b/modules/home/hyprland/chernobyl/hyprland.nix deleted file mode 100644 index 888b41e..0000000 --- a/modules/home/hyprland/chernobyl/hyprland.nix +++ /dev/null @@ -1,174 +0,0 @@ -{ pkgs, ... }: - -{ - wayland.windowManager.hyprland = { - enable = true; - plugins = with pkgs.hyprlandPlugins; [ - hyprbars - borders-plus-plus - hyprexpo - hyprfocus - ]; - settings = { - "$mod" = "SUPER"; - - # Monitor configuration - monitor = ",preferred,auto,1.5"; - - # Environment variables for Wayland rendering - env = [ - "LIBVA_DRIVER_NAME,nvidia" - "XDG_SESSION_TYPE,wayland" - "GDK_SCALE,1" - "OZONE_PLATFORM,wayland" - "QT_QPA_PLATFORM,wayland" - "QT_AUTO_SCREEN_SCALE_FACTOR,1" - "SDL_VIDEODRIVER,wayland" - "CLUTTER_BACKEND,wayland" - ]; - - # Startup commands - exec-once = [ - "dunst" - "nm-applet" - "blueman-applet" - "waybar" - ]; - - # Regular keybindings - bind = [ - # Applications - "$mod, N, exec, firefox" - "$mod, RETURN, exec, kitty" - "$mod, M, exec, rofi -show drun" - "$mod SHIFT, M, exec, kitty nnn" - "$mod SHIFT, S, exec, flameshot gui" - "$mod CTRL, L, exec, hyprlock" - - # Window management - "$mod SHIFT, Q, killactive" - "$mod, F, fullscreen, 0" - "$mod SHIFT, SPACE, togglefloating" - "$mod, SPACE, focusurgentorlast" - - # Focus (h=left, j=down, k=up, l=right) - "$mod, H, movefocus, l" - "$mod, J, movefocus, d" - "$mod, K, movefocus, u" - "$mod, L, movefocus, r" - - # Move windows - "$mod SHIFT, H, movewindow, l" - "$mod SHIFT, J, movewindow, d" - "$mod SHIFT, K, movewindow, u" - "$mod SHIFT, L, movewindow, r" - - # Layout switching - "$mod, S, layoutmsg, togglesplit" - "$mod, W, layoutmsg, preselect l" - "$mod, E, layoutmsg, preselect r" - - # Reload - "$mod SHIFT, C, exec, hyprctl reload" - - # Workspaces (key codes for Czech layout) - "$mod, code:10, workspace, 1" - "$mod, code:11, workspace, 2" - "$mod, code:12, workspace, 3" - "$mod, code:13, workspace, 4" - "$mod, code:14, workspace, 5" - "$mod, code:15, workspace, 6" - "$mod, code:16, workspace, 7" - "$mod, code:17, workspace, 8" - "$mod, code:18, workspace, 9" - "$mod, code:19, workspace, 10" - - "$mod SHIFT, code:10, movetoworkspace, 1" - "$mod SHIFT, code:11, movetoworkspace, 2" - "$mod SHIFT, code:12, movetoworkspace, 3" - "$mod SHIFT, code:13, movetoworkspace, 4" - "$mod SHIFT, code:14, movetoworkspace, 5" - "$mod SHIFT, code:15, movetoworkspace, 6" - "$mod SHIFT, code:16, movetoworkspace, 7" - "$mod SHIFT, code:17, movetoworkspace, 8" - "$mod SHIFT, code:18, movetoworkspace, 9" - "$mod SHIFT, code:19, movetoworkspace, 10" - ]; - - # Brightness keys (repeat when held) - bindel = [ - ", XF86MonBrightnessUp, exec, brightnessctl set 10%+" - ", XF86MonBrightnessDown, exec, brightnessctl set 10%-" - ]; - - # Audio keys (repeat when held) - bindle = [ - ", XF86AudioRaiseVolume, exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%+" - ", XF86AudioLowerVolume, exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%-" - ]; - - # Audio/Mic mute (no repeat) - bindl = [ - ", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle" - ", XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle" - ]; - - # Mouse bindings - bindm = [ - "$mod, mouse:272, movewindow" - "$mod, mouse:273, resizewindow" - ]; - - # Window decoration - general = { - gaps_in = 5; - gaps_out = 10; - border_size = 3; - "col.active_border" = "0xffb12cbf"; - "col.inactive_border" = "0xff4c4c4c"; - layout = "dwindle"; - }; - - decoration = { - rounding = 15; - blur = { - enabled = true; - size = 3; - passes = 1; - }; - shadow = { - enabled = true; - range = 4; - render_power = 3; - }; - }; - - animations = { - enabled = true; - animation = [ - "windows, 1, 7, default" - "windowsOut, 1, 7, default, popin 80%" - "border, 1, 10, default" - "fade, 1, 7, default" - ]; - }; - - input = { - kb_layout = "cz"; - kb_options = "eurosign:e,caps:escape"; - follow_mouse = 1; - }; - - dwindle = { - pseudotile = true; - preserve_split = true; - }; - - # Window rules for VSCode and other apps - windowrulev2 = [ - "suppressevent maximize, class:.*" - "windowrule=tile, class:^(VSCodium|Code)$" - ]; - }; - }; -}
\ No newline at end of file diff --git a/modules/home/hyprland/default.nix b/modules/home/hyprland/default.nix deleted file mode 100644 index b54f464..0000000 --- a/modules/home/hyprland/default.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ ... }: - -{ - # Hyprland home-manager configuration orchestrator - # Uncomment one of the rices below: - imports = [ - #./default.nix # main hyprland rice - ./chernobyl/default.nix # chernobyl hyprland rice - ]; -} diff --git a/modules/home/hyprland/chernobyl/default.nix b/modules/home/niri/chernobyl/default.nix index eecfa60..72dedc5 100644 --- a/modules/home/hyprland/chernobyl/default.nix +++ b/modules/home/niri/chernobyl/default.nix @@ -4,9 +4,9 @@ imports = [ ./dunst.nix ./fastfetch.nix - ./hyprland.nix + ./niri.nix ./kitty.nix ./waybar.nix ./rofi.nix ]; -}
\ No newline at end of file +} diff --git a/modules/home/hyprland/chernobyl/dunst.nix b/modules/home/niri/chernobyl/dunst.nix index b51a4a8..1ff688c 100644 --- a/modules/home/hyprland/chernobyl/dunst.nix +++ b/modules/home/niri/chernobyl/dunst.nix @@ -41,4 +41,4 @@ }; }; }; -}
\ No newline at end of file +} diff --git a/modules/home/hyprland/chernobyl/fastfetch.nix b/modules/home/niri/chernobyl/fastfetch.nix index 8050392..8050392 100644 --- a/modules/home/hyprland/chernobyl/fastfetch.nix +++ b/modules/home/niri/chernobyl/fastfetch.nix diff --git a/modules/home/hyprland/chernobyl/kitty.nix b/modules/home/niri/chernobyl/kitty.nix index 11d4054..1b15b26 100644 --- a/modules/home/hyprland/chernobyl/kitty.nix +++ b/modules/home/niri/chernobyl/kitty.nix @@ -4,4 +4,4 @@ programs.kitty = { enable = true; }; -}
\ No newline at end of file +} diff --git a/modules/home/niri/chernobyl/niri.nix b/modules/home/niri/chernobyl/niri.nix new file mode 100644 index 0000000..b4d129f --- /dev/null +++ b/modules/home/niri/chernobyl/niri.nix @@ -0,0 +1,126 @@ +{ pkgs, ... }: + +{ + wayland.windowManager.niri = { + enable = true; + settings = { + input = { + keyboard = { + xkb = { + layout = "cz"; + options = "eurosign:e,caps:escape"; + }; + }; + mouse = { + accel-profile = "adaptive"; + accel-speed = 0.0; + }; + touchpad = { + tap = true; + dwt = true; + natural-scroll = false; + }; + }; + + outputs = [ + { + name = "eDP-1"; + scale = 1.5; + variable-refresh-rate = true; + } + ]; + + layout = { + gaps = 5; + }; + + spawn-at-startup = [ + { command = [ "dunst" ]; } + { command = [ "nm-applet" ]; } + { command = [ "blueman-applet" ]; } + { command = [ "waybar" ]; } + ]; + + binds = { + "Super+T" = ''spawn "kitty"''; + "Super+N" = ''spawn "firefox"''; + "Super+M" = ''spawn "rofi" "-show" "drun"''; + "Super+Shift+M" = ''spawn "kitty" "nnn"''; + "Super+Shift+S" = ''spawn "flameshot" "gui"''; + "Super+Ctrl+L" = ''spawn "hyprlock"''; + + # Focus + "Super+H" = "focus-column-left"; + "Super+J" = "focus-window-down"; + "Super+K" = "focus-window-up"; + "Super+L" = "focus-column-right"; + + # Move windows + "Super+Shift+H" = "move-column-left"; + "Super+Shift+J" = "move-window-down"; + "Super+Shift+K" = "move-window-up"; + "Super+Shift+L" = "move-column-right"; + + # Workspaces + "Super+1" = "workspace 1"; + "Super+2" = "workspace 2"; + "Super+3" = "workspace 3"; + "Super+4" = "workspace 4"; + "Super+5" = "workspace 5"; + "Super+6" = "workspace 6"; + "Super+7" = "workspace 7"; + "Super+8" = "workspace 8"; + "Super+9" = "workspace 9"; + "Super+0" = "workspace 10"; + + "Super+Shift+1" = "move-workspace 1"; + "Super+Shift+2" = "move-workspace 2"; + "Super+Shift+3" = "move-workspace 3"; + "Super+Shift+4" = "move-workspace 4"; + "Super+Shift+5" = "move-workspace 5"; + "Super+Shift+6" = "move-workspace 6"; + "Super+Shift+7" = "move-workspace 7"; + "Super+Shift+8" = "move-workspace 8"; + "Super+Shift+9" = "move-workspace 9"; + "Super+Shift+0" = "move-workspace 10"; + + # Window management + "Super+Shift+Q" = "close-window"; + "Super+F" = "maximize-column"; + "Super+Shift+Space" = "toggle-window-floating"; + "Super+E" = "toggle-split"; + + # Media keys + "XF86MonBrightnessUp" = ''spawn "brightnessctl" "set" "+10%"''; + "XF86MonBrightnessDown" = ''spawn "brightnessctl" "set" "10%-"''; + "XF86AudioRaiseVolume" = ''spawn "wpctl" "set-volume" "-l" "1.5" "@DEFAULT_AUDIO_SINK@" "5%+"''; + "XF86AudioLowerVolume" = ''spawn "wpctl" "set-volume" "-l" "1.5" "@DEFAULT_AUDIO_SINK@" "5%-"''; + "XF86AudioMute" = ''spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle"''; + "XF86AudioMicMute" = ''spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SOURCE@" "toggle"''; + + # System + "Super+Shift+C" = "reload-config"; + }; + + window-rules = [ + { + geometry-corner-radius = { top-left = 15; top-right = 15; bottom-left = 15; bottom-right = 15; }; + clip-to-geometry = true; + } + ]; + + animations = { + workspace-switch = { + duration-ms = 200; + curve = "ease-out-cubic"; + }; + }; + + prefer-no-csd = true; + }; + }; + + home.packages = with pkgs; [ + hyprlock + ]; +} diff --git a/modules/home/hyprland/chernobyl/rofi.nix b/modules/home/niri/chernobyl/rofi.nix index 477751f..d4ab714 100644 --- a/modules/home/hyprland/chernobyl/rofi.nix +++ b/modules/home/niri/chernobyl/rofi.nix @@ -8,17 +8,6 @@ terminal = "${pkgs.kitty}/bin/kitty"; modes = [ "drun" "ssh" "emoji" "calc" ]; plugins = with pkgs; [ rofi-emoji rofi-calc ]; - extraConfig = { - lines = 20; - columns = 1; - font = "Fira Code 12"; - width = 40; - show-icons = true; - icon-theme = "Papirus"; - matching = "fuzzy"; - sorting-method = "fzf"; - drun-display-format = "{icon} {name}"; - }; theme = '' * { bg0: #1c182d; diff --git a/modules/home/hyprland/chernobyl/waybar.nix b/modules/home/niri/chernobyl/waybar.nix index cd3bedd..cd3bedd 100644 --- a/modules/home/hyprland/chernobyl/waybar.nix +++ b/modules/home/niri/chernobyl/waybar.nix diff --git a/modules/home/niri/default.nix b/modules/home/niri/default.nix new file mode 100644 index 0000000..a968626 --- /dev/null +++ b/modules/home/niri/default.nix @@ -0,0 +1,10 @@ +{ ... }: + +{ + # Niri home-manager configuration orchestrator + # Uncomment one of the rices below: + imports = [ + #./default.nix # main niri rice + ./chernobyl/default.nix # chernobyl niri rice + ]; +} diff --git a/modules/nixos/des/hyprland.nix b/modules/nixos/des/niri.nix index 7bd77b4..6679274 100644 --- a/modules/nixos/des/hyprland.nix +++ b/modules/nixos/des/niri.nix @@ -4,22 +4,21 @@ # Disable X11 for Wayland-only setup services.xserver.enable = false; - # Enable Hyprland - programs.hyprland = { + # Enable Niri + programs.niri = { enable = true; }; # XDG portal for Wayland xdg.portal = { enable = true; - extraPortals = with pkgs; [ xdg-desktop-portal-gtk xdg-desktop-portal-hyprland ]; + extraPortals = with pkgs; [ xdg-desktop-portal-gtk xdg-desktop-portal-gnome ]; }; # Required Wayland packages environment.systemPackages = with pkgs; [ qt6.qtwayland qt6.qttools - hyprpolkitagent ]; # Provide keyboard layout vars for Wayland environments and fallback @@ -2,7 +2,7 @@ { imports = [ - ./modules/home/hyprland/default.nix + ./modules/home/niri/default.nix #./modules/home/i3wm/default.nix ]; home = { |
