1 { config, lib, pkgs, options, ... }:
4 cfg = config.services.prometheus.exporters.apcupsd;
5 inherit (lib) mkOption types concatStringsSep;
10 apcupsdAddress = mkOption {
14 Address of the apcupsd Network Information Server (NIS).
18 apcupsdNetwork = mkOption {
19 type = types.enum ["tcp" "tcp4" "tcp6"];
22 Network of the apcupsd Network Information Server (NIS): one of "tcp", "tcp4", or "tcp6".
29 ${pkgs.prometheus-apcupsd-exporter}/bin/apcupsd_exporter \
30 -telemetry.addr ${cfg.listenAddress}:${toString cfg.port} \
31 -apcupsd.addr ${cfg.apcupsdAddress} \
32 -apcupsd.network ${cfg.apcupsdNetwork} \
33 ${concatStringsSep " \\\n " cfg.extraFlags}