summaryrefslogtreecommitdiffstats
path: root/krebs
diff options
context:
space:
mode:
authorKierán Meinhardt <kieran.meinhardt@gmail.com>2019-07-09 20:30:05 +0200
committerKierán Meinhardt <kieran.meinhardt@gmail.com>2019-07-09 20:50:28 +0200
commitb9ab8446354378719dfa546108d4e96f7852d3d7 (patch)
treec722f8d41adb7ef13bfb10601611b3ea68a6a96c /krebs
parent41a49361440522529f9a74e5fd37dc3a5c4f2bd0 (diff)
urlwatch: add telegram reporting options
Diffstat (limited to 'krebs')
-rw-r--r--krebs/3modules/urlwatch.nix14
1 files changed, 14 insertions, 0 deletions
diff --git a/krebs/3modules/urlwatch.nix b/krebs/3modules/urlwatch.nix
index 3213080de..3c9ff7709 100644
--- a/krebs/3modules/urlwatch.nix
+++ b/krebs/3modules/urlwatch.nix
@@ -56,6 +56,15 @@ let
The format is described in systemd.time(7), CALENDAR EVENTS.
'';
};
+ telegram = {
+ enable = mkEnableOption "krebs.urlwatch.telegram" // { default = false; };
+ botToken = mkOption {
+ type = types.str;
+ };
+ chatId = mkOption {
+ type = types.listOf types.str;
+ };
+ };
urls = mkOption {
type = with types; listOf (either str subtypes.job);
default = [];
@@ -112,6 +121,11 @@ let
color = true;
enabled = true;
};
+ ${if cfg.telegram.enable then "telegram" else null} = {
+ enabled = cfg.telegram.enable;
+ bot_token = cfg.telegram.botToken;
+ chat_id = cfg.telegram.chatId;
+ };
text = {
details = true;
footer = true;