From c2ac689be0b8a26b4b5ec118bc6bc9adcb55800a Mon Sep 17 00:00:00 2001 From: Jon Santmyer Date: Tue, 17 Sep 2024 21:03:44 -0400 Subject: update wayland and nvidia settings; update nvim configs --- modules/hardware/gpu.nix | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) (limited to 'modules/hardware') diff --git a/modules/hardware/gpu.nix b/modules/hardware/gpu.nix index fd696ab..bb8b831 100644 --- a/modules/hardware/gpu.nix +++ b/modules/hardware/gpu.nix @@ -17,10 +17,8 @@ in { config = lib.mkIf (gpuConfig.enable) (lib.mkMerge [ { - hardware.opengl = { + hardware.graphics = { enable = true; - driSupport = true; - driSupport32Bit = true; }; } (lib.mkIf (device.gpu == "intel") { @@ -38,24 +36,31 @@ in { environment.variables.VDPAU_DRIVER = "va_gl"; }) (lib.mkIf (device.gpu == "nvidia") { + boot = { + extraModulePackages = [ + config.boot.kernelPackages.nvidia_x11_beta + ]; + initrd.kernelModules = [ + "nvidia" + "nvidia_modeset" + "nvidia_uvm" + "nvidia_drm" + ]; + blacklistedKernelModules = [ "nouveau" ]; + }; + + environment.systemPackages = with pkgs; [ + pkgs.nvidia-vaapi-driver + ]; + services.xserver.videoDrivers = ["nvidia"]; hardware.nvidia = { modesetting.enable = true; - powerManagement.enable = false; - powerManagement.finegrained = false; + powerManagement.enable = true; open = false; nvidiaSettings = true; - package = config.boot.kernelPackages.nvidiaPackages.production; + package = config.boot.kernelPackages.nvidiaPackages.beta; }; - boot.initrd.kernelModules = [ - "nvidia" - "nvidia_modeset" - "nvidia_uvm" - "nvidia_drm" - ]; - boot.extraModprobeConfig = '' - options nvidia-drm modeset=1 - ''; }) ]); } -- cgit v1.2.1