mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-25 21:44:49 +00:00
nixos/prometheus: add package
option
With a package option we can let the user decide what package to use for prometheus without requiring an overlay.
This commit is contained in:
parent
05f368b60a
commit
0de150e0f2
@ -376,6 +376,15 @@ in {
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
package = mkOption {
|
||||||
|
type = types.package;
|
||||||
|
default = pkgs.prometheus;
|
||||||
|
defaultText = "pkgs.prometheus";
|
||||||
|
description = ''
|
||||||
|
The prometheus package that should be used.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
listenAddress = mkOption {
|
listenAddress = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
default = "0.0.0.0:9090";
|
default = "0.0.0.0:9090";
|
||||||
@ -495,7 +504,7 @@ in {
|
|||||||
after = [ "network.target" ];
|
after = [ "network.target" ];
|
||||||
script = ''
|
script = ''
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
exec ${pkgs.prometheus}/bin/prometheus \
|
exec ${cfg.package}/bin/prometheus \
|
||||||
${concatStringsSep " \\\n " cmdlineArgs}
|
${concatStringsSep " \\\n " cmdlineArgs}
|
||||||
'';
|
'';
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
|
Loading…
Reference in New Issue
Block a user