nix/home/program/bash/module/Notify.nix

17 lines
474 B
Nix
Raw Normal View History

2024-10-12 15:57:45 +03:00
{ secret, ... }:
{
text = ''
# Send Telegram notification.
# Usage: notify <MESSAGE>
function notify() {
2024-10-12 15:57:45 +03:00
curl -X POST -H 'Content-Type: Application/json' -d "${secret.tg.dt "false"}" ${secret.tg.bt} &> /dev/null
}
2024-04-06 03:03:58 +03:00
# Send silent Telegram notification.
# Usage: notify_silent <MESSAGE>
function notify_silent() {
2024-10-12 15:57:45 +03:00
curl -X POST -H 'Content-Type: Application/json' -d "${secret.tg.dt "true"}" ${secret.tg.bt} &> /dev/null
}
'';
2024-04-06 03:03:58 +03:00
}