Drivers
This commit is contained in:
@ -1 +1,56 @@
|
|||||||
# Drivers
|
# Drivers
|
||||||
|
|
||||||
|
In general, I would enable the following:
|
||||||
|
```nix
|
||||||
|
hardware = {
|
||||||
|
enableAllFirmware = true;
|
||||||
|
graphics = {
|
||||||
|
enable = true;
|
||||||
|
enable32Bit = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
`hardware.graphics.enable` enables hardware accelerated graphics drivers, which should, usually, be enable no matter what.
|
||||||
|
|
||||||
|
## NVIDIA
|
||||||
|
|
||||||
|
This enables the proprietary nvidia drivers, with some reasonable defaults.
|
||||||
|
```nix
|
||||||
|
services.xserver.videoDrivers = [ "nvidia" ];
|
||||||
|
hardware.nvidia = {
|
||||||
|
modesetting.enable = true;
|
||||||
|
open = true; # If you are able to, needs an RTX
|
||||||
|
nvidiaSettings = true;
|
||||||
|
package = config.boot.kernelPackages.nvidiaPackages.stable; # https://github.com/NixOS/nixpkgs/blob/master/pkgs/os-specific/linux/nvidia-x11/default.nix for versions available
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
## AMD
|
||||||
|
The following enables the vulkan driver:
|
||||||
|
|
||||||
|
```nix
|
||||||
|
hardware.amdgpu.amdvlk = {
|
||||||
|
enable = true;
|
||||||
|
support32Bit.enable = true;
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
## Intel
|
||||||
|
|
||||||
|
I do not have a Intel system to test this on, but the OG manual mention doing either of these depending on if you are getting screen tearing.[^1]
|
||||||
|
|
||||||
|
```nix
|
||||||
|
services.xserver.videoDrivers = [ "modesetting" ]; # Try this first
|
||||||
|
```
|
||||||
|
|
||||||
|
```nix
|
||||||
|
services.xserver.videoDrivers = [ "intel" ]; # Try these if this the first didn't work
|
||||||
|
services.xserver.deviceSection = ''
|
||||||
|
Option "DRI" "2"
|
||||||
|
Option "TearFree" "true"
|
||||||
|
'';
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
[^1]: [NixOS Manual: Intel Graphics drivers](https://nixos.org/manual/nixos/stable/#sec-x11--graphics-cards-intel)
|
||||||
|
Reference in New Issue
Block a user