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,41 @@
|
|||
{ config, lib, pkgs, options }:
|
||||
|
||||
with lib;
|
||||
|
||||
let cfg = config.services.prometheus.exporters.fastly;
|
||||
in
|
||||
{
|
||||
port = 9118;
|
||||
extraOpts = {
|
||||
debug = mkEnableOption "Debug logging mode for fastly-exporter";
|
||||
|
||||
configFile = mkOption {
|
||||
type = types.nullOr types.path;
|
||||
default = null;
|
||||
description = ''
|
||||
Path to a fastly-exporter configuration file.
|
||||
Example one can be generated with <literal>fastly-exporter --config-file-example</literal>.
|
||||
'';
|
||||
example = "./fastly-exporter-config.txt";
|
||||
};
|
||||
|
||||
tokenPath = mkOption {
|
||||
type = types.nullOr types.path;
|
||||
apply = final: if final == null then null else toString final;
|
||||
description = ''
|
||||
A run-time path to the token file, which is supposed to be provisioned
|
||||
outside of Nix store.
|
||||
'';
|
||||
};
|
||||
};
|
||||
serviceOpts = {
|
||||
script = ''
|
||||
${optionalString (cfg.tokenPath != null)
|
||||
"export FASTLY_API_TOKEN=$(cat ${toString cfg.tokenPath})"}
|
||||
${pkgs.prometheus-fastly-exporter}/bin/fastly-exporter \
|
||||
-listen http://${cfg.listenAddress}:${toString cfg.port}
|
||||
${optionalString cfg.debug "-debug true"} \
|
||||
${optionalString (cfg.configFile != null) "-config-file ${cfg.configFile}"}
|
||||
'';
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue