about summary refs log tree commit diff
path: root/nixos/modules/hardware/video
diff options
context:
space:
mode:
authorKiskae <Kiskae@users.noreply.github.com>2023-04-01 13:52:36 +0200
committerKiskae <Kiskae@users.noreply.github.com>2023-04-01 14:44:43 +0200
commitea126529eb23f39f5a6bf3341103044a151657a0 (patch)
tree83135509034b794896e8a1ee3974779f9435a9fa /nixos/modules/hardware/video
parent1b911d1fe29dcc63efa0afce053c05d4e8f7e0d8 (diff)
nixos/nvidia: allow package to override IBT support
Diffstat (limited to 'nixos/modules/hardware/video')
-rw-r--r--nixos/modules/hardware/video/nvidia.nix4
1 files changed, 3 insertions, 1 deletions
diff --git a/nixos/modules/hardware/video/nvidia.nix b/nixos/modules/hardware/video/nvidia.nix
index 79a3ab6baaab2..6bbbcc58e98a2 100644
--- a/nixos/modules/hardware/video/nvidia.nix
+++ b/nixos/modules/hardware/video/nvidia.nix
@@ -26,6 +26,8 @@ let
   nvidiaPersistencedEnabled =  cfg.nvidiaPersistenced;
   nvidiaSettings = cfg.nvidiaSettings;
   busIDType = types.strMatching "([[:print:]]+[\:\@][0-9]{1,3}\:[0-9]{1,2}\:[0-9])?";
+
+  ibtSupport = cfg.open || (nvidia.ibtSupport or false);
 in
 
 {
@@ -462,7 +464,7 @@ in
     boot.kernelParams = optional (offloadCfg.enable || cfg.modesetting.enable) "nvidia-drm.modeset=1"
       ++ optional cfg.powerManagement.enable "nvidia.NVreg_PreserveVideoMemoryAllocations=1"
       ++ optional cfg.open "nvidia.NVreg_OpenRmEnableUnsupportedGpus=1"
-      ++ optional (!cfg.open && config.boot.kernelPackages.kernel.kernelAtLeast "6.2" && lib.versionOlder nvidia_x11.version "530") "ibt=off";
+      ++ optional (config.boot.kernelPackages.kernel.kernelAtLeast "6.2" && !ibtSupport) "ibt=off";
 
     services.udev.extraRules =
       ''