From e708e7a14d9108d4b61cb0d869d980f6af56e8b1 Mon Sep 17 00:00:00 2001 From: seth Date: Thu, 11 Jul 2024 15:04:04 -0400 Subject: [PATCH] nixos/nvidia: enable modesetting by default on driver versions >= 535 --- nixos/modules/hardware/video/nvidia.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nixos/modules/hardware/video/nvidia.nix b/nixos/modules/hardware/video/nvidia.nix index 94d6acbdefea..1aa79166dee7 100644 --- a/nixos/modules/hardware/video/nvidia.nix +++ b/nixos/modules/hardware/video/nvidia.nix @@ -101,7 +101,10 @@ in Enabling this and using version 545 or newer of the proprietary NVIDIA driver causes it to provide its own framebuffer device, which can cause Wayland compositors to work when they otherwise wouldn't. - ''; + '' // { + default = lib.versionAtLeast nvidia_x11.version "535"; + defaultText = lib.literalExpression "lib.versionAtLeast nvidia_x11.version \"535\""; + }; prime.nvidiaBusId = lib.mkOption { type = busIDType;