nixos/slurm: expose NVML library when NVIDIA datacenter is enabled

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.
This commit is contained in:
Edward Tjörnhammar
2026-03-07 19:38:52 +01:00
parent dd0db5bcf2
commit ed11acb469
@@ -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;
[