Add Bitcoin Pulse module integration

This commit is contained in:
Tobserver Agent 2026-07-26 18:23:37 +07:00
parent 3d8488a9b4
commit fc8c7de05d
3 changed files with 146 additions and 5 deletions

124
flake.lock generated
View file

@ -1,8 +1,29 @@
{
"nodes": {
"checker": {
"bitcoin-pulse": {
"inputs": {
"clj-nix": "clj-nix",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1785063525,
"narHash": "sha256-sQ2VQzADqvZMo1I4mmQ08e8UZCsD/OQv80naVZRRWr8=",
"ref": "refs/heads/main",
"rev": "74af564b41aa1d96d675b3861af00276ebad6ed9",
"revCount": 25,
"type": "git",
"url": "https://codeberg.org/oibot/BitcoinPulseAPI.git"
},
"original": {
"type": "git",
"url": "https://codeberg.org/oibot/BitcoinPulseAPI.git"
}
},
"checker": {
"inputs": {
"clj-nix": "clj-nix_2",
"nixpkgs": "nixpkgs"
},
"locked": {
@ -23,6 +44,29 @@
"inputs": {
"devshell": "devshell",
"nix-fetcher-data": "nix-fetcher-data",
"nixpkgs": [
"bitcoin-pulse",
"nixpkgs"
]
},
"locked": {
"lastModified": 1776760934,
"narHash": "sha256-WVzvTigFwWcJ0VkAFMzA3jE8kbHGahCJ0FJFqVYhPqM=",
"owner": "jlesquembre",
"repo": "clj-nix",
"rev": "2b1290ee56e9bbd50e9b5874c985d34ad2f1b458",
"type": "github"
},
"original": {
"owner": "jlesquembre",
"repo": "clj-nix",
"type": "github"
}
},
"clj-nix_2": {
"inputs": {
"devshell": "devshell_2",
"nix-fetcher-data": "nix-fetcher-data_2",
"nixpkgs": [
"checker",
"nixpkgs"
@ -43,6 +87,28 @@
}
},
"devshell": {
"inputs": {
"nixpkgs": [
"bitcoin-pulse",
"clj-nix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1768818222,
"narHash": "sha256-460jc0+CZfyaO8+w8JNtlClB2n4ui1RbHfPTLkpwhU8=",
"owner": "numtide",
"repo": "devshell",
"rev": "255a2b1725a20d060f566e4755dbf571bbbb5f76",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "devshell",
"type": "github"
}
},
"devshell_2": {
"inputs": {
"nixpkgs": [
"checker",
@ -83,6 +149,24 @@
}
},
"flake-parts_2": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib_2"
},
"locked": {
"lastModified": 1719745305,
"narHash": "sha256-xwgjVUpqSviudEkpQnioeez1Uo2wzrsMaJKJClh+Bls=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "c3c5ecc05edc7dafba779c6c1a61cd08ac6583e9",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_3": {
"inputs": {
"nixpkgs-lib": [
"hermes-agent",
@ -105,7 +189,7 @@
},
"hermes-agent": {
"inputs": {
"flake-parts": "flake-parts_2",
"flake-parts": "flake-parts_3",
"nixpkgs": "nixpkgs_2",
"npm-lockfile-fix": "npm-lockfile-fix",
"pyproject-build-systems": "pyproject-build-systems",
@ -129,6 +213,29 @@
"nix-fetcher-data": {
"inputs": {
"flake-parts": "flake-parts",
"nixpkgs": [
"bitcoin-pulse",
"clj-nix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1755022803,
"narHash": "sha256-/QtBdVfZlrRJW5enUoWlBE2wrLXJBMJ45X0rZh0jiaU=",
"owner": "jlesquembre",
"repo": "nix-fetcher-data",
"rev": "9da3926b1459d6ff15268072d1c51351b82811b9",
"type": "github"
},
"original": {
"owner": "jlesquembre",
"repo": "nix-fetcher-data",
"type": "github"
}
},
"nix-fetcher-data_2": {
"inputs": {
"flake-parts": "flake-parts_2",
"nixpkgs": [
"checker",
"clj-nix",
@ -177,6 +284,18 @@
"url": "https://github.com/NixOS/nixpkgs/archive/eb9ceca17df2ea50a250b6b27f7bf6ab0186f198.tar.gz"
}
},
"nixpkgs-lib_2": {
"locked": {
"lastModified": 1717284937,
"narHash": "sha256-lIbdfCsf8LMFloheeE6N31+BMIeixqyQWbSr2vk79EQ=",
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/eb9ceca17df2ea50a250b6b27f7bf6ab0186f198.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/eb9ceca17df2ea50a250b6b27f7bf6ab0186f198.tar.gz"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1775036866,
@ -320,6 +439,7 @@
},
"root": {
"inputs": {
"bitcoin-pulse": "bitcoin-pulse",
"checker": "checker",
"hermes-agent": "hermes-agent",
"nixpkgs": "nixpkgs_3",

View file

@ -5,23 +5,29 @@
sops-nix.inputs.nixpkgs.follows = "nixpkgs";
checker.url = "git+https://codeberg.org/oibot/checker.git";
hermes-agent.url = "github:NousResearch/hermes-agent";
bitcoin-pulse = {
url = "git+https://codeberg.org/oibot/BitcoinPulseAPI.git";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, sops-nix, checker, hermes-agent, ... }:
outputs = { self, nixpkgs, sops-nix, checker, hermes-agent, bitcoin-pulse, ... }:
let
system = "x86_64-linux";
in {
in
{
nixosConfigurations.tobserver = nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = {
inherit checker;
inherit bitcoin-pulse checker;
};
modules = [
sops-nix.nixosModules.sops
./hardware-configuration.nix
./configuration.nix
./modules/bitcoin-pulse.nix
./modules/bitcoin.nix
./modules/electrs.nix
./modules/mempool.nix

15
modules/bitcoin-pulse.nix Normal file
View file

@ -0,0 +1,15 @@
{ bitcoin-pulse, ... }:
{
imports = [ bitcoin-pulse.nixosModules.default ];
services.bitcoin-pulse = {
# BIT-28 and BIT-29 will enable the production instance after PostgreSQL,
# migrations, and credentials have been configured.
enable = false;
bindAddress = "127.0.0.1";
port = 3000;
mempool.baseUrl = "http://127.0.0.1:8999";
};
}