NVIDIA: Difference between revisions
imported>User No edit summary |
imported>User No edit summary |
||
| Line 30: | Line 30: | ||
</nowiki>}} | </nowiki>}} | ||
Firstly you need to enable the proprietary nvidia driver | |||
{{file|/etc/nixos/configuration.nix|nix|<nowiki> | |||
{ | |||
services.xserver.videoDrivers = [ "nvidia" ]; | |||
... | |||
</nowiki>}} | |||
Note that on certain laptops and/or if you are using a custom kernel version, you may have issues with your NixOS system finding the primary display. In this case you should also specify modesetting in videoDrivers as well, i.e. | |||
{{file|/etc/nixos/configuration.nix|nix|<nowiki> | |||
{ | |||
services.xserver.videoDrivers = [ "modesetting" "nvidia" ]; | |||
... | |||
</nowiki>}} | |||
Then you need to setup the Bus ID's of the cards as seen below. | |||
''Note: Bus ID is important and needs to be formatted properly'' | ''Note: Bus ID is important and needs to be formatted properly'' | ||
| Line 69: | Line 91: | ||
environment.systemPackages = [ nvidia-offload ]; | environment.systemPackages = [ nvidia-offload ]; | ||
services.xserver.videoDrivers = [ | services.xserver.videoDrivers = [ "nvidia" ]; | ||
hardware.nvidia.prime.offload.enable = true; | hardware.nvidia.prime.offload.enable = true; | ||
hardware.nvidia.prime = { | hardware.nvidia.prime = { | ||