diff options
| -rwxr-xr-x | flake.lock | 124 | ||||
| -rwxr-xr-x | flake.nix | 4 | ||||
| -rw-r--r-- | modules/home/niri/chernobyl/default.nix | 1 | ||||
| -rw-r--r-- | modules/home/niri/chernobyl/electron.nix | 9 | ||||
| -rw-r--r-- | modules/home/niri/chernobyl/niri.nix | 131 | ||||
| -rw-r--r-- | modules/home/niri/chernobyl/niri/config.kdl | 0 | ||||
| -rw-r--r-- | modules/nixos/des/niri.nix | 6 |
7 files changed, 157 insertions, 118 deletions
@@ -21,8 +21,96 @@ "type": "github" } }, + "niri": { + "inputs": { + "niri-stable": "niri-stable", + "niri-unstable": "niri-unstable", + "nixpkgs": "nixpkgs", + "nixpkgs-stable": "nixpkgs-stable", + "xwayland-satellite-stable": "xwayland-satellite-stable", + "xwayland-satellite-unstable": "xwayland-satellite-unstable" + }, + "locked": { + "lastModified": 1770056451, + "narHash": "sha256-8dDG3+suKAiWFAdP6S9OKasusbC/cP33wA/zQw/i9bE=", + "owner": "sodiboo", + "repo": "niri-flake", + "rev": "fffa014b0fd6ff9ebf1c86fc460fee2ea0ac9a5e", + "type": "github" + }, + "original": { + "owner": "sodiboo", + "repo": "niri-flake", + "type": "github" + } + }, + "niri-stable": { + "flake": false, + "locked": { + "lastModified": 1756556321, + "narHash": "sha256-RLD89dfjN0RVO86C/Mot0T7aduCygPGaYbog566F0Qo=", + "owner": "YaLTeR", + "repo": "niri", + "rev": "01be0e65f4eb91a9cd624ac0b76aaeab765c7294", + "type": "github" + }, + "original": { + "owner": "YaLTeR", + "ref": "v25.08", + "repo": "niri", + "type": "github" + } + }, + "niri-unstable": { + "flake": false, + "locked": { + "lastModified": 1769577126, + "narHash": "sha256-v9vz9Rj4MGwPuhGELdvpRKl2HH+xvkgat6VwL0L86Fg=", + "owner": "YaLTeR", + "repo": "niri", + "rev": "f30db163b5748e8cf95c05aba77d0d3736f40543", + "type": "github" + }, + "original": { + "owner": "YaLTeR", + "repo": "niri", + "type": "github" + } + }, "nixpkgs": { "locked": { + "lastModified": 1770019141, + "narHash": "sha256-VKS4ZLNx4PNrABoB0L8KUpc1fE7CLpQXQs985tGfaCU=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "cb369ef2efd432b3cdf8622b0ffc0a97a02f3137", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-stable": { + "locked": { + "lastModified": 1769900590, + "narHash": "sha256-I7Lmgj3owOTBGuauy9FL6qdpeK2umDoe07lM4V+PnyA=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "41e216c0ca66c83b12ab7a98cc326b5db01db646", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-25.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { "lastModified": 1769598131, "narHash": "sha256-e7VO/kGLgRMbWtpBqdWl0uFg8Y2XWFMdz0uUJvlML8o=", "owner": "nixos", @@ -40,7 +128,41 @@ "root": { "inputs": { "home-manager": "home-manager", - "nixpkgs": "nixpkgs" + "niri": "niri", + "nixpkgs": "nixpkgs_2" + } + }, + "xwayland-satellite-stable": { + "flake": false, + "locked": { + "lastModified": 1755491097, + "narHash": "sha256-m+9tUfsmBeF2Gn4HWa6vSITZ4Gz1eA1F5Kh62B0N4oE=", + "owner": "Supreeeme", + "repo": "xwayland-satellite", + "rev": "388d291e82ffbc73be18169d39470f340707edaa", + "type": "github" + }, + "original": { + "owner": "Supreeeme", + "ref": "v0.7", + "repo": "xwayland-satellite", + "type": "github" + } + }, + "xwayland-satellite-unstable": { + "flake": false, + "locked": { + "lastModified": 1769713942, + "narHash": "sha256-0BtCSO2qzYK/akRDsERqRVLknCYD3FYErc+szreSHUo=", + "owner": "Supreeeme", + "repo": "xwayland-satellite", + "rev": "37ec78ee26e158b71f42e113e0e7dd9d5eb6bdb0", + "type": "github" + }, + "original": { + "owner": "Supreeeme", + "repo": "xwayland-satellite", + "type": "github" } } }, @@ -7,9 +7,10 @@ url = "github:nix-community/home-manager/release-25.11"; inputs.nixpkgs.follows = "nixpkgs"; }; + niri.url = "github:sodiboo/niri-flake"; }; - outputs = { self, nixpkgs, home-manager, ... }@inputs: { + outputs = { self, nixpkgs, home-manager, niri, ... }@inputs: { nixosConfigurations = { kronos = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; @@ -19,6 +20,7 @@ { home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; + home-manager.sharedModules = [ niri.homeModules.niri ]; home-manager.users.mun = import ./mun.nix; } diff --git a/modules/home/niri/chernobyl/default.nix b/modules/home/niri/chernobyl/default.nix index 72dedc5..0fa8c20 100644 --- a/modules/home/niri/chernobyl/default.nix +++ b/modules/home/niri/chernobyl/default.nix @@ -3,6 +3,7 @@ { imports = [ ./dunst.nix + ./electron.nix ./fastfetch.nix ./niri.nix ./kitty.nix diff --git a/modules/home/niri/chernobyl/electron.nix b/modules/home/niri/chernobyl/electron.nix new file mode 100644 index 0000000..95d03af --- /dev/null +++ b/modules/home/niri/chernobyl/electron.nix @@ -0,0 +1,9 @@ +{ pkgs, ... }: + +{ + (pkgs.vscode.override { + commandLineArgs = [ + "--wayland-text-input-version=3" + ]; +}); +} diff --git a/modules/home/niri/chernobyl/niri.nix b/modules/home/niri/chernobyl/niri.nix index b4d129f..a2a1bb3 100644 --- a/modules/home/niri/chernobyl/niri.nix +++ b/modules/home/niri/chernobyl/niri.nix @@ -1,126 +1,27 @@ { pkgs, ... }: { - wayland.windowManager.niri = { + programs.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; + settings = { }; }; home.packages = with pkgs; [ - hyprlock + fuzzel + swaylock + alacritty + swaybg # wallpaper ]; + xdg.configFile."niri/config.kdl".source = ./niri/config.kdl; + + programs.alacritty.enable = true; # Super+T in the default setting (terminal) + programs.fuzzel.enable = true; # Super+D in the default setting (app launcher) + programs.swaylock.enable = true; # Super+Alt+L in the default setting (screen locker) + programs.waybar.enable = true; # launch on startup in the default setting (bar) + services.mako.enable = true; # notification daemon + services.swayidle.enable = true; # idle management daemon + services.polkit-gnome.enable = true; # polkit } + diff --git a/modules/home/niri/chernobyl/niri/config.kdl b/modules/home/niri/chernobyl/niri/config.kdl new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/modules/home/niri/chernobyl/niri/config.kdl diff --git a/modules/nixos/des/niri.nix b/modules/nixos/des/niri.nix index 6679274..0a1578b 100644 --- a/modules/nixos/des/niri.nix +++ b/modules/nixos/des/niri.nix @@ -26,4 +26,8 @@ XKB_DEFAULT_LAYOUT = "cz"; XKB_DEFAULT_OPTIONS = "eurosign:e,caps:escape"; }; -}
\ No newline at end of file + + # Make Electron apps work on Wayland + environment.sessionVariables.NIXOS_OZONE_WL = "1"; +} + |
