18 lines
523 B
Nix
18 lines
523 B
Nix
{pkgs, config, ... }: {
|
|
# Enable video drivers
|
|
services.xserver.videoDrivers = ["nvidia"];
|
|
|
|
hardware.nvidia = {
|
|
modesetting.enable = true;
|
|
nvidiaSettings = false;
|
|
package = config.boot.kernelPackages.nvidiaPackages.beta;
|
|
open = false;
|
|
};
|
|
|
|
environment.sessionVariables = {
|
|
CUDA_PATH = "${pkgs.cudatoolkit}";
|
|
EXTRA_LDFLAGS = "-L/lib -L${pkgs.linuxPackages.nvidia_x11}/lib";
|
|
EXTRA_CCFLAGS = "-I/usr/include";
|
|
};
|
|
}
|