nixos/prometheus-bitcoin-exporter: expose package option

This commit is contained in:
0xb10c 2024-05-03 15:02:39 +02:00
parent 14dc65b52b
commit 0c4215faf0
No known key found for this signature in database
GPG Key ID: E2FFD5B1D88CA97D

View File

@ -8,6 +8,8 @@ in
{
port = 9332;
extraOpts = {
package = lib.mkPackageOption pkgs "prometheus-bitcoin-exporter" { };
rpcUser = mkOption {
type = types.str;
default = "bitcoinrpc";
@ -66,7 +68,7 @@ in
serviceOpts = {
script = ''
export BITCOIN_RPC_PASSWORD=$(cat ${cfg.rpcPasswordFile})
exec ${pkgs.prometheus-bitcoin-exporter}/bin/bitcoind-monitor.py
exec ${cfg.package}/bin/bitcoind-monitor.py
'';
environment = {