2024-08-24 22:16:51 -04:00
|
|
|
{config, ... }: {
|
|
|
|
# Enable video drivers
|
|
|
|
services.xserver.videoDrivers = ["nvidia"];
|
|
|
|
|
|
|
|
hardware.nvidia = {
|
|
|
|
modesetting.enable = true;
|
|
|
|
nvidiaSettings = false;
|
|
|
|
package = config.boot.kernelPackages.nvidiaPackages.beta;
|
|
|
|
open = true;
|
|
|
|
};
|
2024-08-26 15:40:42 -04:00
|
|
|
|
|
|
|
pkgs.stdenv.mkDerivation {
|
|
|
|
name = "cuda-env-shell";
|
|
|
|
buildInputs = with pkgs; [
|
|
|
|
cudatoolkit
|
|
|
|
];
|
|
|
|
shellHook = ''
|
|
|
|
export CUDA_PATH=${pkgs.cudatoolkit}
|
|
|
|
export EXTRA_LDFLAGS="-L/lib -L${pkgs.linuxPackages.nvidia_x11}/lib"
|
|
|
|
export EXTRA_CCFLAGS="-I/usr/include"
|
|
|
|
'';
|
2024-08-24 22:16:51 -04:00
|
|
|
}
|