nixos/modules/hardware/nvidia/default.nix

37 lines
673 B
Nix
Raw Normal View History

2023-07-06 02:41:20 +04:00
{ config, pkgs, lib, ...}:
{
2023-07-07 16:23:29 +04:00
hardware.opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
};
2023-07-06 02:41:20 +04:00
# tell xserver i want this driver
services.xserver.videoDrivers = ["nvidia"];
hardware.nvidia = {
# wayland support cause why not
modesetting.enable = true;
# TODO(sako):: add this as a cfg option for hosts
open = false;
# settings
nvidiaSettings = true;
# Package
package = config.boot.kernelPackages.nvidiaPackages.stable;
prime = {
offload = {
enable = true;
enableOffloadCmd = true;
};
intelBusId = "PCI:0:2:0";
nvidiaBusId = "PCI:1:0:0";
};
};
}