add examples and test VM
This commit is contained in:
18
examples/bitcoin.nix
Normal file
18
examples/bitcoin.nix
Normal file
@@ -0,0 +1,18 @@
|
||||
{ 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";
|
||||
})
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user