nixos/prometheus-bitcoin-exporter: expose package option
This commit is contained in:
parent
14dc65b52b
commit
0c4215faf0
@ -8,6 +8,8 @@ in
|
|||||||
{
|
{
|
||||||
port = 9332;
|
port = 9332;
|
||||||
extraOpts = {
|
extraOpts = {
|
||||||
|
package = lib.mkPackageOption pkgs "prometheus-bitcoin-exporter" { };
|
||||||
|
|
||||||
rpcUser = mkOption {
|
rpcUser = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
default = "bitcoinrpc";
|
default = "bitcoinrpc";
|
||||||
@ -66,7 +68,7 @@ in
|
|||||||
serviceOpts = {
|
serviceOpts = {
|
||||||
script = ''
|
script = ''
|
||||||
export BITCOIN_RPC_PASSWORD=$(cat ${cfg.rpcPasswordFile})
|
export BITCOIN_RPC_PASSWORD=$(cat ${cfg.rpcPasswordFile})
|
||||||
exec ${pkgs.prometheus-bitcoin-exporter}/bin/bitcoind-monitor.py
|
exec ${cfg.package}/bin/bitcoind-monitor.py
|
||||||
'';
|
'';
|
||||||
|
|
||||||
environment = {
|
environment = {
|
||||||
|
Loading…
Reference in New Issue
Block a user