ae359d1ef2
Fixes issues described in #208242 for this part of the nixpkgs tree. There are no behavioral changes in this, it only adjusts the code so that it is easier to understand.
19 lines
428 B
Nix
19 lines
428 B
Nix
{ config, lib, pkgs, options, ... }:
|
|
|
|
let
|
|
cfg = config.services.prometheus.exporters.keylight;
|
|
inherit (lib) concatStringsSep;
|
|
in
|
|
{
|
|
port = 9288;
|
|
serviceOpts = {
|
|
serviceConfig = {
|
|
ExecStart = ''
|
|
${pkgs.prometheus-keylight-exporter}/bin/keylight_exporter \
|
|
-metrics.addr ${cfg.listenAddress}:${toString cfg.port} \
|
|
${concatStringsSep " \\\n " cfg.extraFlags}
|
|
'';
|
|
};
|
|
};
|
|
}
|