NVIDIA: Difference between revisions
imported>Crocodillian m Use XDG_DATA_HOME instead of XDG_DATA_DIRS. |
imported>Flexagoon Use hardware.nvidia.modesetting.enable for enabling modesetting |
||
| Line 58: | Line 58: | ||
</nowiki>}} | </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 | 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 use <code>hardware.nvidia.modesetting.enable</code>, i.e.: | ||
{{file|/etc/nixos/configuration.nix|nix|<nowiki> | {{file|/etc/nixos/configuration.nix|nix|<nowiki> | ||
{ | { | ||
services.xserver.videoDrivers = [ | hardware.nvidia.modesetting.enable = true; | ||
... | services.xserver.videoDrivers = [ "nvidia" ]; | ||
// ... | |||
</nowiki>}} | </nowiki>}} | ||
| Line 213: | Line 214: | ||
{{file|/etc/nixos/configuration.nix|nix|<nowiki> | {{file|/etc/nixos/configuration.nix|nix|<nowiki> | ||
{ | { | ||
services.xserver.videoDrivers = [ | hardware.nvidia.modesetting.enable = true; | ||
services.xserver.videoDrivers = [ "nvidia" ]; | |||
hardware.nvidia.optimus_prime = { | hardware.nvidia.optimus_prime = { | ||
enable = true; | enable = true; | ||