mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 17:33:09 +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 {
|
||||
type = types.str;
|
||||
default = "0.0.0.0:9090";
|
||||
@ -495,7 +504,7 @@ in {
|
||||
after = [ "network.target" ];
|
||||
script = ''
|
||||
#!/bin/sh
|
||||
exec ${pkgs.prometheus}/bin/prometheus \
|
||||
exec ${cfg.package}/bin/prometheus \
|
||||
${concatStringsSep " \\\n " cmdlineArgs}
|
||||
'';
|
||||
serviceConfig = {
|
||||
|
Loading…
Reference in New Issue
Block a user