From 8f276bad191797d4c28e345cb7bf8474df3cd533 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Thu, 10 Oct 2024 15:35:18 +0200 Subject: [PATCH] fix 24.05 compat --- modules/nixos/graphics.nix | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/modules/nixos/graphics.nix b/modules/nixos/graphics.nix index e34e0d8..8acc8b6 100644 --- a/modules/nixos/graphics.nix +++ b/modules/nixos/graphics.nix @@ -21,8 +21,15 @@ in }; }; - config = lib.mkIf cfg.enable { - hardware.graphics.enable = lib.mkDefault true; - boot.initrd.kernelModules = config.facter.detected.boot.graphics.kernelModules; - }; + config = lib.mkIf cfg.enable ( + { + boot.initrd.kernelModules = config.facter.detected.boot.graphics.kernelModules; + } + // ( + if lib.versionOlder lib.version "24.11pre" then + { hardware.opengl.enable = lib.mkDefault true; } + else + { hardware.graphics.enable = lib.mkDefault true; } + ) + ); }