From ada6d15a194f3f92895088fa6d2b5e6b926f7b36 Mon Sep 17 00:00:00 2001 From: Charlie Root Date: Tue, 29 Oct 2024 18:29:39 +0100 Subject: [PATCH] hyprland: switch to nixpkgs hyprland package --- modules/options/usrEnv/desktop.nix | 4 ++-- modules/services/greetd.nix | 6 +++--- modules/wms/wayland/hyprland/module.nix | 12 +++++++----- modules/wms/wayland/hyprland/settings.nix | 11 +++++++++++ 4 files changed, 23 insertions(+), 10 deletions(-) diff --git a/modules/options/usrEnv/desktop.nix b/modules/options/usrEnv/desktop.nix index 874a9b6..23de25f 100644 --- a/modules/options/usrEnv/desktop.nix +++ b/modules/options/usrEnv/desktop.nix @@ -34,14 +34,14 @@ in { package = mkOption { type = package; - default = inputs'.hyprland.packages.hyprland; + default = pkgs.hyprland; description = '' The Hyprland package to be used. ''; }; portalPackage = mkOption { type = package; - default = inputs'.hyprland.packages.xdg-desktop-portal-hyprland; + default = pkgs.xdg-desktop-portal-hyprland; description = "The hyprland portal package"; }; }; diff --git a/modules/services/greetd.nix b/modules/services/greetd.nix index bbb376c..34d7848 100644 --- a/modules/services/greetd.nix +++ b/modules/services/greetd.nix @@ -25,10 +25,10 @@ with lib; let #exec-once=[workspace 1;fullscreen;noanim] ${ pkgs.greetd.${cfg.greeter} }/bin/${cfg.greeter} -l; ${ - inputs'.hyprland.packages.hyprland + pkgs.hyprland }/bin/hyprctl dispatch exit #exec-once=${ - inputs'.hyprland.packages.hyprland + pkgs.hyprland }/bin/hyprctl dispatch focuswindow ${cfg.greeter} ''; in { @@ -49,7 +49,7 @@ in { enable = true; settings.default_session = { command = "${ - inputs'.hyprland.packages.hyprland + pkgs.hyprland }/bin/Hyprland --config ${hyprlandConfig}"; user = username; }; diff --git a/modules/wms/wayland/hyprland/module.nix b/modules/wms/wayland/hyprland/module.nix index c4d0589..f73f6e8 100644 --- a/modules/wms/wayland/hyprland/module.nix +++ b/modules/wms/wayland/hyprland/module.nix @@ -23,17 +23,18 @@ in { config = mkIf cfg.enable { programs.hyprland = { enable = true; - inherit (cfg) package portalPackage; + package = pkgs.hyprland; + portalPackage = pkgs.xdg-desktop-portal-hyprland; }; # xdg Portal xdg.portal = { enable = true; configPackages = mkDefault [ - cfg.portalPackage + pkgs.xdg-desktop-portal-hyprland ]; extraPortals = [ pkgs.xdg-desktop-portal-gtk - cfg.portalPackage + pkgs.xdg-desktop-portal-hyprland ]; config = { common.default = ["gtk" "hyprland"]; @@ -43,11 +44,12 @@ in { home-manager.users.${username} = { wayland.windowManager.hyprland = { enable = true; - inherit (cfg) package; + package = pkgs.hyprland; # Split-monitor-workspaces provides awesome-like workspace behaviour plugins = [ - hyprsplit + pkgs.hyprlandPlugins.hyprsplit + pkgs.hyprlandPlugins.hypr-dynamic-cursors ]; # Xwayland for X applications diff --git a/modules/wms/wayland/hyprland/settings.nix b/modules/wms/wayland/hyprland/settings.nix index 5fd6550..d30a3ae 100644 --- a/modules/wms/wayland/hyprland/settings.nix +++ b/modules/wms/wayland/hyprland/settings.nix @@ -61,6 +61,17 @@ in { num_workspaces = 10; persistent_workspaces = true; }; + hypr-dynamic-cursors = { + enabled = true; + + mode = "tilt"; + rotate = { + length = 20; + offset = 0.0; + }; + threshhold = 2; + shake.enabled = false; + }; }; }; };