add examples and test VM

This commit is contained in:
2026-02-20 18:14:49 +01:00
parent df73fc25e6
commit 8868eb8736
12 changed files with 325 additions and 416 deletions

18
examples/bitcoin.nix Normal file
View 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";
})
];
};
};
}