Unverified Commit 845a6e97 authored by IndeedNotJames's avatar IndeedNotJames
Browse files

nixos/grafana-agent: use `lib.getExe` as binary names changed between updates

and `lib.getExe` allows a safe handling and potential backport of this.
But for that to work it would require 22.11 to set `pkgs.grafana-agent.meta.mainProgram = "agent"`

Relevant upstream release: https://github.com/grafana/agent/releases/tag/v0.31.0
parent bde538be
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -140,7 +140,7 @@ in
        # We can't use Environment=HOSTNAME=%H, as it doesn't include the domain part.
        export HOSTNAME=$(< /proc/sys/kernel/hostname)

        exec ${cfg.package}/bin/agent -config.expand-env -config.file ${configFile}
        exec ${lib.getExe cfg.package} -config.expand-env -config.file ${configFile}
      '';
      serviceConfig = {
        Restart = "always";