urlwatch: add telegram reporting options
This commit is contained in:
parent
41a4936144
commit
b9ab844635
@ -56,6 +56,15 @@ let
|
|||||||
The format is described in systemd.time(7), CALENDAR EVENTS.
|
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 {
|
urls = mkOption {
|
||||||
type = with types; listOf (either str subtypes.job);
|
type = with types; listOf (either str subtypes.job);
|
||||||
default = [];
|
default = [];
|
||||||
@ -112,6 +121,11 @@ let
|
|||||||
color = true;
|
color = true;
|
||||||
enabled = 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 = {
|
text = {
|
||||||
details = true;
|
details = true;
|
||||||
footer = true;
|
footer = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user