about summary refs log tree commit diff
path: root/nixpkgs/nixos/modules/services/monitoring/prometheus/exporters/keylight.nix
blob: 44169cce6745eb98c0c380e668d633f8b648eb8d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{ 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}
      '';
    };
  };
}