NVIDIA: Difference between revisions
imported>Jmq m Unfree also required for settings. |
imported>Gerg-L No edit summary |
||
| Line 12: | Line 12: | ||
}; | }; | ||
# Tell Xorg to use the nvidia driver (also valid for Wayland) | |||
# Tell Xorg to use the nvidia driver | |||
services.xserver.videoDrivers = ["nvidia"]; | services.xserver.videoDrivers = ["nvidia"]; | ||
hardware.nvidia = { | hardware.nvidia = { | ||
# Modesetting is needed for most | # Modesetting is needed for most Wayland compositors | ||
modesetting.enable = true; | modesetting.enable = true; | ||
# Use the open source version of the kernel module | # Use the open source version of the kernel module | ||
# Only available on driver 515.43.04+ | # Only available on driver 515.43.04+ | ||
open = | open = false; | ||
# Enable the nvidia settings menu | # Enable the nvidia settings menu | ||
| Line 40: | Line 33: | ||
} | } | ||
</nowiki>}} | </nowiki>}} | ||
{{note| | |||
Be sure to allow [[Unfree Software]] | |||
The unfree packages from nvidia are: <code>nvidia-x11</code>, <code>nvidia-settings</code> and <code>nvidia-persistenced</code>}} | |||
As noted in the final comment, you'll need to determine the appropriate driver version for your card. For "legacy" cards, you can consult [https://www.nvidia.com/en-us/drivers/unix/legacy-gpu/ nvidia official legacy driver list]. You can view available version by using tab completion in the nix repl | |||
<syntaxhighlight lang="bash"> | |||
$ nix-repl | |||
Welcome to Nix 2.17.0pre20230701_7b39a38. Type :? for help. | |||
nix-repl> :l <nixpkgs> | |||
Added 19688 variables. | |||
nix-repl> pkgs.linuxPackages.nvidia_x11_ | |||
</syntaxhighlight> | |||
then hit '''TAB''' to view valid suffix's like <code>legacy470</code> | |||
= Using GPUs on non-NixOS = | = Using GPUs on non-NixOS = | ||