nixpkgs/nixos/modules/services/monitoring/prometheus/exporters/keylight.nix
Matt Layher e77426822f
nixos/prometheus-keylight-exporter: new module
Signed-off-by: Matt Layher <mdlayher@gmail.com>
2020-06-10 13:12:43 -04:00

19 lines
400 B
Nix

{ config, lib, pkgs, options }:
with lib;
let
cfg = config.services.prometheus.exporters.keylight;
in
{
port = 9288;
serviceOpts = {
serviceConfig = {
ExecStart = ''
${pkgs.prometheus-keylight-exporter}/bin/keylight_exporter \
-metrics.addr ${cfg.listenAddress}:${toString cfg.port} \
${concatStringsSep " \\\n " cfg.extraFlags}
'';
};
};
}