19 lines
558 B
Nix
19 lines
558 B
Nix
{ pkgs, ... }:
|
|
{
|
|
services.panoptikon.enable = true;
|
|
services.panoptikon.watchers = {
|
|
bitcoin-price = {
|
|
script = pkgs.panoptikonWatchers.json {
|
|
jqScript = ".[]|{name: .name, price: .current_price, change: .price_change_24h}";
|
|
} "https://api.coingecko.com/api/v3/coins/markets?vs_currency=usd&ids=bitcoin";
|
|
frequency = "*:0/30";
|
|
reporters = [
|
|
(pkgs.panoptikonReporters.telegram {
|
|
chatId = "123";
|
|
tokenPath = pkgs.writeText "my-telegram-token.txt" "123:abc";
|
|
})
|
|
];
|
|
};
|
|
};
|
|
}
|