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

16 lines
450 B
Nix
Raw Normal View History

2024-11-04 04:37:29 +03:00
{ secret, ... }: {
text = ''
# Send Telegram notification.
# Usage: notify <MESSAGE>
function notify() {
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
2024-11-04 04:37:29 +03:00
# Send silent Telegram notification.
# Usage: notify_silent <MESSAGE>
function notify_silent() {
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
}