aboutsummaryrefslogtreecommitdiffstats
path: root/modules/desktop/hyprland/default.nix
diff options
context:
space:
mode:
authorArpit Chakladar <arpitchakladar+git@gmail.com>2026-07-26 01:09:12 +0530
committerArpit Chakladar <arpitchakladar+git@gmail.com>2026-07-26 01:10:07 +0530
commit8c13757c6d6c503774d833507f281eaa499b3bd9 (patch)
tree2b3c3134650bc25d878f2b15e5a49e67ebe5870e /modules/desktop/hyprland/default.nix
parente7c2c4c4485c13b1817577abe9fdf8ca3a5ce4f1 (diff)
downloadhome-manager-config-8c13757c6d6c503774d833507f281eaa499b3bd9.tar.gz
home-manager-config-8c13757c6d6c503774d833507f281eaa499b3bd9.zip
feat: enable hyprland vfr and other optimizations
- Enable misc.vfr in hyprland for variable frame rate
Diffstat (limited to 'modules/desktop/hyprland/default.nix')
-rw-r--r--modules/desktop/hyprland/default.nix73
1 files changed, 67 insertions, 6 deletions
diff --git a/modules/desktop/hyprland/default.nix b/modules/desktop/hyprland/default.nix
index 7c5f811..bea5c90 100644
--- a/modules/desktop/hyprland/default.nix
+++ b/modules/desktop/hyprland/default.nix
@@ -13,7 +13,57 @@ in
./keybindings.nix
];
+ options.desktop.hardware.gpu = {
+ nvidia.enable = lib.mkEnableOption "Nvidia GPU Wayland/Hyprland optimizations";
+
+ amd.enable = lib.mkEnableOption "AMD GPU Wayland/Hyprland optimizations";
+
+ primaryCard = lib.mkOption {
+ type = lib.types.str;
+ default = "/dev/dri/by-path/pci-0000:05:00.0-card";
+ description = "Path to primary DRM card device for Aquamarine/Hyprland rendering";
+ };
+
+ secondaryCard = lib.mkOption {
+ type = lib.types.nullOr lib.types.str;
+ default = "/dev/dri/by-path/pci-0000:01:00.0-card";
+ description = "Path to secondary DRM card device for offloading (null if single GPU)";
+ };
+ };
+
config = lib.mkIf config.desktop.enable {
+
+ home.sessionVariables = lib.mkMerge [
+ {
+ NIXOS_OZONE_WL = "1";
+ QT_QPA_PLATFORM = "wayland;xcb";
+ SDL_VIDEODRIVER = "wayland";
+ CLUTTER_BACKEND = "wayland";
+
+ AQ_DRM_DEVICES =
+ if config.desktop.hardware.gpu.secondaryCard != null then
+ "${config.desktop.hardware.gpu.primaryCard}:${config.desktop.hardware.gpu.secondaryCard}"
+ else
+ config.desktop.hardware.gpu.primaryCard;
+ }
+
+ (lib.mkIf config.desktop.hardware.gpu.nvidia.enable {
+ LIBVA_DRIVER_NAME = "nvidia";
+ __GLX_VENDOR_LIBRARY_NAME = "nvidia";
+ GBM_BACKEND = "nvidia-drm";
+ NVD_BACKEND = "direct";
+
+ AQ_NO_MODIFIERS = "1";
+ __GL_YIELD = "USLEEP";
+ __GL_VRR_ALLOWED = "0";
+ })
+
+ (lib.mkIf config.desktop.hardware.gpu.amd.enable {
+ AMD_VULKAN_ICD = "RADV";
+ MESA_VK_DEVICE_SELECT = "1002:";
+ })
+ ];
+
wayland.windowManager.hyprland = {
enable = true;
configType = "lua";
@@ -40,8 +90,24 @@ in
layout = "dwindle";
};
+ debug = {
+ vfr = true;
+ };
+
+ misc = {
+ vrr = lib.mkIf config.desktop.hardware.gpu.amd.enable 1;
+ disable_hyprland_logo = true;
+ disable_splash_rendering = true;
+ };
+
decoration = {
rounding = 0;
+ blur = {
+ enabled = false;
+ };
+ shadow = {
+ enabled = false;
+ };
};
input = {
@@ -51,6 +117,7 @@ in
cursor = {
enable_hyprcursor = true;
+ no_hardware_cursors = config.desktop.hardware.gpu.nvidia.enable;
};
dwindle = {
@@ -87,11 +154,5 @@ in
gtk.enable = false;
x11.enable = false;
};
-
- home.packages = with pkgs; [
- grim
- slurp
- wl-clipboard
- ];
};
}