Add cudainfo program to test CUDA in sandbox

The cudainfo program is executed inside the build sandbox so we can see
if it works properly. It uses the autoAddDriverRunpath hook to inject in
the runpath the location of the library directory for CUDA libraries.
This commit is contained in:
2025-07-22 15:24:55 +02:00
parent 378716c0fa
commit f4563008b1
5 changed files with 649 additions and 1 deletions

View File

@@ -1,4 +1,4 @@
{ lib, config, ... }:
{ lib, config, pkgs, ... }:
{
# Configure Nvidia driver to use with CUDA
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.production;
@@ -15,4 +15,6 @@
programs.nix-required-mounts.allowedPatterns.nvidia-gpu.paths = [
config.systemd.tmpfiles.settings.graphics-driver."/run/opengl-driver"."L+".argument
];
environment.systemPackages = [ pkgs.cudainfo ];
}