{ config, pkgs, ... }: { boot.blacklistedKernelModules = [ "nouveau" ]; # This version is being hardcoded here so that we dont follow nixos-unstable if it updates beyond what the nvidia driver supports. boot.kernelPackages = pkgs.linuxPackages_6_18; boot.kernelParams = [ "mem_sleep_default=deep" "video=efifb:1920x1080" ]; hardware.graphics = { enable = true; enable32Bit = true; }; hardware.nvidia = { modesetting.enable = true; powerManagement.enable = true; # This nvidia version is used as any version later than this fail to suspend by hanging the system. # This seems to stem from certain hardware issues with my msi laptop motherboard. package = config.boot.kernelPackages.nvidiaPackages.legacy_580; open = true; prime = { offload = { enable = true; enableOffloadCmd = true; }; intelBusId = "PCI:0@0:2:0"; nvidiaBusId = "PCI:1@0:0:0"; }; }; }