From 31c5516a9f52e5efd96f85281f228069038219d8 Mon Sep 17 00:00:00 2001 From: Florian RICHER Date: Fri, 21 Jun 2024 21:59:22 +0200 Subject: [PATCH] Update OS: Fix hardware.opengl -> hardware.graphics migration --- modules/system/hardware/nvidia/default.nix | 58 +++++++++++----------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/modules/system/hardware/nvidia/default.nix b/modules/system/hardware/nvidia/default.nix index fa6625a..08d8191 100644 --- a/modules/system/hardware/nvidia/default.nix +++ b/modules/system/hardware/nvidia/default.nix @@ -11,41 +11,41 @@ in ''; }; config = mkIf cfg.enable { - # Enable OpenGL - hardware.opengl = { - enable = true; - driSupport = true; - driSupport32Bit = true; - }; - # Load nvidia driver for Xorg and Wayland services.xserver.videoDrivers = ["nvidia"]; - hardware.nvidia = { - # Modesetting is required. - modesetting.enable = true; + hardware = { + graphics = { + enable = true; + enable32Bit = true; + }; - # Nvidia power management. Experimental, and can cause sleep/suspend to fail. - powerManagement.enable = false; - # Fine-grained power management. Turns off GPU when not in use. - # Experimental and only works on modern Nvidia GPUs (Turing or newer). - powerManagement.finegrained = false; + nvidia = { + # Modesetting is required. + modesetting.enable = true; - # Use the NVidia open source kernel module (not to be confused with the - # independent third-party "nouveau" open source driver). - # Support is limited to the Turing and later architectures. Full list of - # supported GPUs is at: - # https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus - # Only available from driver 515.43.04+ - # Currently alpha-quality/buggy, so false is currently the recommended setting. - open = false; + # Nvidia power management. Experimental, and can cause sleep/suspend to fail. + powerManagement.enable = false; + # Fine-grained power management. Turns off GPU when not in use. + # Experimental and only works on modern Nvidia GPUs (Turing or newer). + powerManagement.finegrained = false; - # Enable the Nvidia settings menu, - # accessible via `nvidia-settings`. - nvidiaSettings = true; + # Use the NVidia open source kernel module (not to be confused with the + # independent third-party "nouveau" open source driver). + # Support is limited to the Turing and later architectures. Full list of + # supported GPUs is at: + # https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus + # Only available from driver 515.43.04+ + # Currently alpha-quality/buggy, so false is currently the recommended setting. + open = false; - # Optionally, you may need to select the appropriate driver version for your specific GPU. - package = config.boot.kernelPackages.nvidiaPackages.beta; + # Enable the Nvidia settings menu, + # accessible via `nvidia-settings`. + nvidiaSettings = true; + + # Optionally, you may need to select the appropriate driver version for your specific GPU. + package = config.boot.kernelPackages.nvidiaPackages.beta; + }; }; }; -} \ No newline at end of file +}