diff --git a/flake.lock b/flake.lock index 4a9bf3d..2893c06 100644 --- a/flake.lock +++ b/flake.lock @@ -112,6 +112,62 @@ "type": "github" } }, + "niri": { + "inputs": { + "niri-stable": "niri-stable", + "niri-unstable": "niri-unstable", + "nixpkgs": "nixpkgs_4", + "nixpkgs-stable": "nixpkgs-stable", + "xwayland-satellite-stable": "xwayland-satellite-stable", + "xwayland-satellite-unstable": "xwayland-satellite-unstable" + }, + "locked": { + "lastModified": 1783267733, + "narHash": "sha256-DTvaM+0vanneOcKg3NKXV7ilf0ShY4BOBz/nde5GHos=", + "owner": "sodiboo", + "repo": "niri-flake", + "rev": "74053f79cad0f6c3a4a0be6b7928795d2e6a9f4b", + "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": 1783248941, + "narHash": "sha256-citgYJbvR1iUKXpiWlFq3NO+fw6hXGL3Qk1ampU7lhA=", + "owner": "YaLTeR", + "repo": "niri", + "rev": "a30ca7983b2f1fc3ddeb209b3fe18fa78e0dbd25", + "type": "github" + }, + "original": { + "owner": "YaLTeR", + "repo": "niri", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1781173989, @@ -125,6 +181,22 @@ "url": "https://channels.nixos.org/nixpkgs-unstable/nixexprs.tar.xz" } }, + "nixpkgs-stable": { + "locked": { + "lastModified": 1782847189, + "narHash": "sha256-twXPFqFsrrY5r28Zh7Homgcp2gUMBgQ6WDS98Q/3xFI=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "b6018f87da91d19d0ab4cf979885689b469cdd41", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-25.11", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs_2": { "locked": { "lastModified": 1746378225, @@ -157,6 +229,22 @@ } }, "nixpkgs_4": { + "locked": { + "lastModified": 1783224372, + "narHash": "sha256-8i/87eeoqiGE4yOTjwSA3Eh/ziJRQEmd/unYU+K27sk=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "d407951447dcd00442e97087bf374aad70c04cea", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_5": { "locked": { "lastModified": 1781074563, "narHash": "sha256-md8WlXOlfnIeHeOScMTTHFyf2d6iaTwPl2apR5EQ3P4=", @@ -178,7 +266,8 @@ "gl": "gl", "hm": "hm", "mc": "mc", - "nixpkgs": "nixpkgs_4" + "niri": "niri", + "nixpkgs": "nixpkgs_5" } }, "systems": { @@ -210,6 +299,39 @@ "repo": "default", "type": "github" } + }, + "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": 1781226823, + "narHash": "sha256-28696iIw8uE0ZUyFTtzhEM8xMh85clCYypMxkvUi+sc=", + "owner": "Supreeeme", + "repo": "xwayland-satellite", + "rev": "8575d0ef55d70f9b4c46b6bffb3accf912217e1e", + "type": "github" + }, + "original": { + "owner": "Supreeeme", + "repo": "xwayland-satellite", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 3ccbd5c..6f756b4 100644 --- a/flake.nix +++ b/flake.nix @@ -10,6 +10,7 @@ gl.url = "github:nix-community/nixGL"; ctp.url = "github:catppuccin/nix"; + niri.url = "github:sodiboo/niri-flake"; mc.url = "github:Infinidoge/nix-minecraft"; }; diff --git a/modules/home/rice/compositor.nix b/modules/home/rice/compositor.nix index ced7eb7..add66fc 100644 --- a/modules/home/rice/compositor.nix +++ b/modules/home/rice/compositor.nix @@ -3,12 +3,39 @@ ./keybinds.nix ]; - catppuccin.hyprland.enable = false; # temp fix until i get things migrated to lua - - wayland.windowManager.sway = { - enable = true; + programs.niri = { + settings = { + outputs."eDP-1" = { + mode = { width=1920; height=1080; refresh=60.006; }; + position = { x=0; y=0; }; + scale = 1.0; + }; + environment = { + XCURSOR_SIZE = "24"; + XCURSOR_THEME = "catppuccin-${ctp-opt.flavor}-light-cursors"; + + CLIPHIST_MAX_ITEMS = "36"; + + GTK_APPLICATION_PREFER_DARK_THEME = "1"; + GTK_THEME = "Adwaita:dark"; + QT_QPA_PLATFORMTHEME = "kvantum"; + QT_STYLE_OVERRIDE = "kvantum"; + }; + spawn-at-startup = map (sh: { inherit sh; }) [ + "wl-paste --type text --watch cliphist store" + "wl-paste --type image --watch cliphist store" + + "waybar &" + "sunshine &" + "blueman-applet &" + "nm-applet &" + "tailscale systray &" + ]; + }; }; + catppuccin.hyprland.enable = false; # temp fix until i get things migrated to lua + wayland.windowManager.hyprland = { enable = true; package = pkgs.hyprland; # inputs.hl.packages."${pkgs.system}".hyprland; diff --git a/modules/home/rice/keybinds.nix b/modules/home/rice/keybinds.nix index c0d4634..6a9c841 100644 --- a/modules/home/rice/keybinds.nix +++ b/modules/home/rice/keybinds.nix @@ -18,6 +18,31 @@ }; }; }; + + programs.niri.settings.binds = { + "XF86AudioRaiseVolume" = { action.spawn = [ "wpctl" "set-volume" "-l" "1" "@DEFAULT_AUDIO_SINK@" "5%+" ]; allow-when-locked = true; }; + "XF86AudioLowerVolume" = { action.spawn = [ "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "5%-" ]; allow-when-locked = true; }; + "XF86AudioMute" = { action.spawn = [ "wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle" ]; allow-when-locked = true; }; + "XF86AudioMicMute" = { action.spawn = [ "wpctl" "set-mute" "@DEFAULT_AUDIO_SOURCE@" "toggle" ]; allow-when-locked = true; }; + "XF86MonBrightnessUp" = { action.spawn = [ "brightnessctl" "s" "10%+" ]; allow-when-locked = true; }; + "XF86MonBrightnessDown" = { action.spawn = [ "brightnessctl" "s" "10%-" ]; allow-when-locked = true; }; + + "Mod+Q".action.close-window = {}; + "Mod+W".action.maximize-column = {}; + "Print".action.screenshot-screen = {}; + + "Mod+Up".action.focus-workspace-up = {}; + "Mod+Down".action.focus-workspace-down = {}; + "Mod+Left".action.focus-column-left = {}; + "Mod+Right".action.focus-column-right = {}; + + "Mod+R".action.spawn = [ "rofi" "-show" "drun" "-show-icons" "-display-drun" ":" "-run-command" "uwsm app -- {cmd}" ]; + "Mod+E".action.spawn = [ "pcmanfm-qt" ]; + "Mod+T".action.spawn = [ "kitty" ]; + "Mod+Y".action.spawn = [ "brave" "--restore-last-session" ]; + "Mod+Return".action.spawn-sh = "ls ~/Projects | rofi -dmenu -p \"Open Project\" | xargs -I {} sh -c 'mkdir -p ~/Projects/\"{}\" && zeditor ~/Projects/\"{}\"'"; + }; + wayland.windowManager.hyprland = { settings = { gestures = { diff --git a/modules/system/desktop.nix b/modules/system/desktop.nix index 9f31a27..933e8b7 100644 --- a/modules/system/desktop.nix +++ b/modules/system/desktop.nix @@ -1,5 +1,8 @@ -{ pkgs, enable-dm, ... }: { +{ inputs, pkgs, enable-dm, ... }: { + nixpkgs.overlays = [ inputs.niri.overlays.niri ]; imports = [ + inputs.niri.nixosModules.niri + ./misc/programs.nix ./misc/graphics.nix ./misc/theme.nix @@ -7,12 +10,15 @@ ./base.nix ]; - programs.hyprland = { - enable = true; - withUWSM = true; - xwayland.enable = true; - package = pkgs.hyprland; # if rice.enable then inputs.hl.packages."${pkgs.system}".hyprland else pkgs.hyprland; - portalPackage = pkgs.xdg-desktop-portal-hyprland; # inputs.hl.packages.${pkgs.system}.xdg-desktop-portal-hyprland; + programs = { + niri.enable = true; + hyprland = { + enable = true; + withUWSM = true; + xwayland.enable = true; + package = pkgs.hyprland; # if rice.enable then inputs.hl.packages."${pkgs.system}".hyprland else pkgs.hyprland; + portalPackage = pkgs.xdg-desktop-portal-hyprland; # inputs.hl.packages.${pkgs.system}.xdg-desktop-portal-hyprland; + }; }; xdg.portal = {