mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-25 13:35:13 +00:00
nixos/services.prometheus.xmpp-alerts: remove with lib;
This commit is contained in:
parent
f9825ae100
commit
4f47314003
@ -1,7 +1,4 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.services.prometheus.xmpp-alerts;
|
cfg = config.services.prometheus.xmpp-alerts;
|
||||||
settingsFormat = pkgs.formats.yaml {};
|
settingsFormat = pkgs.formats.yaml {};
|
||||||
@ -9,15 +6,15 @@ let
|
|||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
(mkRenamedOptionModule
|
(lib.mkRenamedOptionModule
|
||||||
[ "services" "prometheus" "xmpp-alerts" "configuration" ]
|
[ "services" "prometheus" "xmpp-alerts" "configuration" ]
|
||||||
[ "services" "prometheus" "xmpp-alerts" "settings" ])
|
[ "services" "prometheus" "xmpp-alerts" "settings" ])
|
||||||
];
|
];
|
||||||
|
|
||||||
options.services.prometheus.xmpp-alerts = {
|
options.services.prometheus.xmpp-alerts = {
|
||||||
enable = mkEnableOption "XMPP Web hook service for Alertmanager";
|
enable = lib.mkEnableOption "XMPP Web hook service for Alertmanager";
|
||||||
|
|
||||||
settings = mkOption {
|
settings = lib.mkOption {
|
||||||
type = settingsFormat.type;
|
type = settingsFormat.type;
|
||||||
default = {};
|
default = {};
|
||||||
|
|
||||||
@ -29,7 +26,7 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
systemd.services.prometheus-xmpp-alerts = {
|
systemd.services.prometheus-xmpp-alerts = {
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
after = [ "network-online.target" ];
|
after = [ "network-online.target" ];
|
||||||
|
Loading…
Reference in New Issue
Block a user