NixOS-Config/nixos/hardware/nvidia.nix

18 lines
523 B
Nix
Raw Normal View History

{pkgs, config, ... }: {
2024-08-24 22:16:51 -04:00
# Enable video drivers
services.xserver.videoDrivers = ["nvidia"];
hardware.nvidia = {
modesetting.enable = true;
nvidiaSettings = false;
package = config.boot.kernelPackages.nvidiaPackages.beta;
open = false;
2024-08-24 22:16:51 -04:00
};
environment.sessionVariables = {
CUDA_PATH = "${pkgs.cudatoolkit}";
EXTRA_LDFLAGS = "-L/lib -L${pkgs.linuxPackages.nvidia_x11}/lib";
EXTRA_CCFLAGS = "-I/usr/include";
};
2024-08-24 22:16:51 -04:00
}