Merge pull request #308796 from 0xB10C/2024-05-promethues-bitcoin-exporter-expose-package

nixos/prometheus-bitcoin-exporter: expose package option
This commit is contained in:
Pavol Rusnak 2024-05-03 23:09:17 +02:00 committed by GitHub
commit 23f72abf0c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -7,6 +7,8 @@ in
{
port = 9332;
extraOpts = {
package = lib.mkPackageOption pkgs "prometheus-bitcoin-exporter" { };
rpcUser = mkOption {
type = types.str;
default = "bitcoinrpc";
@ -65,7 +67,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 = {