uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
|
|
@ -0,0 +1,50 @@
|
|||
{ config, lib, pkgs, options }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.services.prometheus.exporters.flow;
|
||||
in {
|
||||
port = 9590;
|
||||
extraOpts = {
|
||||
brokers = mkOption {
|
||||
type = types.listOf types.str;
|
||||
example = literalExpression ''[ "kafka.example.org:19092" ]'';
|
||||
description = "List of Kafka brokers to connect to.";
|
||||
};
|
||||
|
||||
asn = mkOption {
|
||||
type = types.ints.positive;
|
||||
example = 65542;
|
||||
description = "The ASN being monitored.";
|
||||
};
|
||||
|
||||
partitions = mkOption {
|
||||
type = types.listOf types.int;
|
||||
default = [];
|
||||
description = ''
|
||||
The number of the partitions to consume, none means all.
|
||||
'';
|
||||
};
|
||||
|
||||
topic = mkOption {
|
||||
type = types.str;
|
||||
example = "pmacct.acct";
|
||||
description = "The Kafka topic to consume from.";
|
||||
};
|
||||
};
|
||||
|
||||
serviceOpts = {
|
||||
serviceConfig = {
|
||||
DynamicUser = true;
|
||||
ExecStart = ''
|
||||
${pkgs.prometheus-flow-exporter}/bin/flow-exporter \
|
||||
-asn ${toString cfg.asn} \
|
||||
-topic ${cfg.topic} \
|
||||
-brokers ${concatStringsSep "," cfg.brokers} \
|
||||
${optionalString (cfg.partitions != []) "-partitions ${concatStringsSep "," cfg.partitions}"} \
|
||||
-addr ${cfg.listenAddress}:${toString cfg.port} ${concatStringsSep " " cfg.extraFlags}
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue