From ffd0593f5181cb32bd3fec83f12be1b6fcfffbce Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Mallo Date: Thu, 21 Sep 2023 22:18:30 +0200 Subject: [PATCH] Set the SLURM_CONF variable --- m/module/slurm-exporter.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/m/module/slurm-exporter.nix b/m/module/slurm-exporter.nix index 87b047d..55163c4 100644 --- a/m/module/slurm-exporter.nix +++ b/m/module/slurm-exporter.nix @@ -1,6 +1,7 @@ { config, lib, pkgs, ... }: # See also: https://github.com/NixOS/nixpkgs/pull/112010 +# And: https://github.com/NixOS/nixpkgs/pull/115839 with lib; @@ -29,7 +30,12 @@ with lib; ExecStart = '' ${pkgs.prometheus-slurm-exporter}/bin/prometheus-slurm-exporter --listen-address "127.0.0.1:9341" ''; - Environment = [ "PATH=${pkgs.slurm}/bin" ]; + Environment = [ + "PATH=${pkgs.slurm}/bin" + # We need to specify the slurm config to be able to talk to the slurmd + # daemon. + "SLURM_CONF=${config.services.slurm.etcSlurm}/slurm.conf" + ]; }; }; }