mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-20 20:03:24 +00:00
nixos/prometheus: add package
option to alertmanager
This commit is contained in:
parent
6845ebbff1
commit
d1ef00ebee
@ -23,6 +23,15 @@ in {
|
||||
services.prometheus.alertmanager = {
|
||||
enable = mkEnableOption "Prometheus Alertmanager";
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.prometheus-alertmanager;
|
||||
defaultText = "pkgs.alertmanager";
|
||||
description = ''
|
||||
Package that should be used for alertmanager.
|
||||
'';
|
||||
};
|
||||
|
||||
user = mkOption {
|
||||
type = types.str;
|
||||
default = "nobody";
|
||||
@ -127,7 +136,7 @@ in {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "network.target" ];
|
||||
script = ''
|
||||
${pkgs.prometheus-alertmanager.bin}/bin/alertmanager \
|
||||
${cfg.package}/bin/alertmanager \
|
||||
${concatStringsSep " \\\n " cmdlineArgs}
|
||||
'';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user