Initial commit
This commit is contained in:
commit
f5345d8f6a
10 changed files with 619 additions and 0 deletions
30
modules/electrs.nix
Normal file
30
modules/electrs.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
systemd.services.electrs = {
|
||||
description ="Electrs Bitcoin Electrum Server";
|
||||
after = [ "bitcoind-mainnet.service" ];
|
||||
wants = [ "bitcoind-mainnet.service" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
|
||||
serviceConfig = {
|
||||
User = "bitcoind-mainnet";
|
||||
Group = "bitcoind-mainnet";
|
||||
ExecStart = "${pkgs.electrs}/bin/electrs --conf /etc/electrs.toml";
|
||||
Restart = "on-failure";
|
||||
StateDirectory = "electrs";
|
||||
};
|
||||
};
|
||||
|
||||
environment.etc."electrs.toml".text = ''
|
||||
network = "bitcoin"
|
||||
db_dir = "/var/lib/electrs/db"
|
||||
daemon_dir = "/var/lib/bitcoind"
|
||||
daemon_rpc_addr="127.0.0.1:8332"
|
||||
daemon_p2p_addr="127.0.0.1:8333"
|
||||
electrum_rpc_addr = "0.0.0.0:50001"
|
||||
log_filters = "INFO"
|
||||
cookie_file = "/var/lib/bitcoind/.cookie"
|
||||
jsonrpc_timeout = "300s"
|
||||
'';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue