Guest User

Untitled

a guest
Sep 19th, 2025
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.34 KB | None | 0 0
  1. { config, pkgs, ... }:
  2.  
  3. {
  4. boot = {
  5. # https://forums.developer.nvidia.com/t/550-54-14-cannot-create-sg-table-for-nvkmskapimemory-spammed-when-launching-chrome-on-wayland/284775/26
  6. initrd.kernelModules = [ "nvidia" "i915" "nvidia_modeset" "nvidia_uvm" "nvidia-drm" ];
  7. # extraModulePackages = [ config.boot.kernelPackages.nvidia_x11 ];
  8. kernelParams = [ "nvidia-drm.fbdev=1" ];
  9. };
  10.  
  11. hardware = {
  12. # deprecated for graphics.enable
  13. # opengl = {
  14. # enable = true;
  15. # # extraPackages = [ pkgs.intel-media-driver pkgs.vaapiVdpau ];
  16. # };
  17.  
  18. graphics = {
  19. # For 32 bit applications
  20. # enable32Bit = true;
  21. enable = true;
  22. };
  23.  
  24. nvidia = {
  25. # Modesetting is required.
  26. modesetting.enable = true;
  27.  
  28. # Nvidia power management. Experimental, and can cause sleep/suspend to fail.
  29. # Enable this if you have graphical corruption issues or application crashes after waking
  30. # up from sleep. This fixes it by saving the entire VRAM memory to /tmp/ instead
  31. # of just the bare essentials.
  32. powerManagement.enable = true;
  33.  
  34. # Fine-grained power management. Turns off GPU when not in use.
  35. # Experimental and only works on modern Nvidia GPUs (Turing or newer).
  36. powerManagement.finegrained = false;
  37.  
  38. # Use the NVidia open source kernel module (not to be confused with the
  39. # independent third-party "nouveau" open source driver).
  40. # Support is limited to the Turing and later architectures. Full list of
  41. # supported GPUs is at:
  42. # https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus
  43. # Only available from driver 515.43.04+
  44. # Currently alpha-quality/buggy, so false is currently the recommended setting.
  45. open = false;
  46.  
  47. forceFullCompositionPipeline = true;
  48.  
  49. prime = {
  50. intelBusId = "PCI:0:2:0";
  51. nvidiaBusId = "PCI:1:0:0";
  52. sync.enable = true;
  53. # Make the Intel iGP default. The NVIDIA Quadro is for CUDA/NVENC
  54. # reverseSync.enable = true;
  55. # sync.enable = true;
  56. };
  57. nvidiaSettings = true;
  58.  
  59. # Optionally, you may need to select the appropriate driver version for your specific GPU.
  60. package = config.boot.kernelPackages.nvidiaPackages.beta;
  61. };
  62. };
  63.  
  64. services.xserver.videoDrivers = [ "nvidia" ];
  65.  
  66. }
Advertisement
Add Comment
Please, Sign In to add comment