diff options
| author | Freya Murphy <freya@freyacat.org> | 2026-01-07 12:40:05 -0500 |
|---|---|---|
| committer | Freya Murphy <freya@freyacat.org> | 2026-01-07 16:41:08 -0500 |
| commit | 32410af3593f82e1fff01d69246526c3529be5df (patch) | |
| tree | b1501d526af9dc0d4308c467238fac4c70fc30a2 /shells/cuda.nix | |
| parent | move solaar rules to udev package (diff) | |
| download | dotfiles-nix-32410af3593f82e1fff01d69246526c3529be5df.tar.gz dotfiles-nix-32410af3593f82e1fff01d69246526c3529be5df.tar.bz2 dotfiles-nix-32410af3593f82e1fff01d69246526c3529be5df.zip | |
move custom devshells into dotfiles
Diffstat (limited to 'shells/cuda.nix')
| -rw-r--r-- | shells/cuda.nix | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/shells/cuda.nix b/shells/cuda.nix new file mode 100644 index 0000000..3935296 --- /dev/null +++ b/shells/cuda.nix @@ -0,0 +1,45 @@ +{ + pkgs, + lib, +}: let + nvidiaPackage = pkgs.linuxPackages_latest.nvidiaPackages.stable; + libs = with pkgs; [ + # CUDA + cudaPackages.cuda_cudart + cudaPackages.cuda_nvcc + cudaPackages.cuda_cccl + cudaPackages.cudnn + cudatoolkit + nvidiaPackage + + # OpenGL + libGLU + libGL + freeglut + + # X11 + xorg.libXi + xorg.libXmu + xorg.libXext + xorg.libX11 + xorg.libXv + xorg.libXrandr + + # Dev Tools + ffmpeg + zlib + gcc + binutils + ]; +in { + packages = libs; + LD_LIBRARY_PATH = lib.makeLibraryPath libs; + + shellHook = '' + # Nvidia Driver setup + export NVIDIA_VISIBLE_DEVICES=all + export NVIDIA_DRIVER_CAPABILITIES=compute,utility + export CUDA_VISIBLE_DEVICES=0 + export CUDA_PATH=${pkgs.cudatoolkit} + ''; +} |