From 2f548cab7de39dae4d1782d52607f8fc9209ff50 Mon Sep 17 00:00:00 2001 From: 514fpv Date: Mon, 25 Mar 2024 13:15:25 +0800 Subject: [PATCH] global(fs): add ability to customise curl args in alert --- global/fs/zfs/alert.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/global/fs/zfs/alert.nix b/global/fs/zfs/alert.nix index d9c76ae7..9af1317d 100644 --- a/global/fs/zfs/alert.nix +++ b/global/fs/zfs/alert.nix @@ -12,6 +12,7 @@ ${pkgs.curl}/bin/curl -sG \ --data-urlencode "chat_id=$CHATID" \ --data-urlencode "text=$ALERT" \ + $CURL_EXTRA_ARGS \ "https://api.telegram.org/bot$APIKEY/sendMessage" ''; image = pkgs.writeShellScript "telegram-image" '' @@ -22,6 +23,7 @@ -F "chat_id=$CHATID" \ -F "caption=$ALERT" \ -F "photo=@-" \ + $CURL_EXTRA_ARGS \ "https://api.telegram.org/bot$APIKEY/sendPhoto" ''; };