From ed11acb4697d155f30c4a08ba388a4311b2f3153 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edward=20Tj=C3=B6rnhammar?= Date: Sat, 7 Mar 2026 19:38:52 +0100 Subject: [PATCH] nixos/slurm: expose NVML library when NVIDIA datacenter is enabled MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When `hardware.nvidia.datacenter.enable` is turned on we likely want the NVIDIA Management Library (NVML) at runtime so that Slurm can query GPU metrics. This adds the driver directory containing `libnvidia‑ml.so` to `slurmd` environment's `LD_LIBRARY_PATH`, making it discoverable. --- nixos/modules/services/computing/slurm/slurm.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nixos/modules/services/computing/slurm/slurm.nix b/nixos/modules/services/computing/slurm/slurm.nix index caba71898601..5f7296deaa29 100644 --- a/nixos/modules/services/computing/slurm/slurm.nix +++ b/nixos/modules/services/computing/slurm/slurm.nix @@ -453,6 +453,8 @@ in users.groups.slurmrestd = lib.mkIf (cfg.rest.enable) { }; systemd.services.slurmd = lib.mkIf (cfg.client.enable) { + + environment.LD_LIBRARY_PATH = lib.mkIf config.hardware.nvidia.datacenter.enable "/run/opengl-driver/lib"; path = with pkgs; [