electrs: add netns
- Adds electrs to netns-isolation.services - Adds daemonrpc option and specifies address option to allow using electrs with network namespaces - Adds host option (defaults to localhost) as target of hidden service
This commit is contained in:
@@ -17,6 +17,14 @@ in {
|
||||
default = "/var/lib/electrs";
|
||||
description = "The data directory for electrs.";
|
||||
};
|
||||
# Needed until electrs tls proxy is removed
|
||||
host = mkOption {
|
||||
type = types.str;
|
||||
default = "localhost";
|
||||
description = ''
|
||||
The host on which incoming connections arrive.
|
||||
'';
|
||||
};
|
||||
user = mkOption {
|
||||
type = types.str;
|
||||
default = "electrs";
|
||||
@@ -44,6 +52,13 @@ in {
|
||||
default = 50001;
|
||||
description = "RPC port.";
|
||||
};
|
||||
daemonrpc = mkOption {
|
||||
type = types.str;
|
||||
default = "127.0.0.1:8332";
|
||||
description = ''
|
||||
Bitcoin daemon JSONRPC 'addr:port' to connect
|
||||
'';
|
||||
};
|
||||
extraArgs = mkOption {
|
||||
type = types.separatedString " ";
|
||||
default = "";
|
||||
@@ -97,7 +112,8 @@ in {
|
||||
"--jsonrpc-import --index-batch-size=10"
|
||||
} \
|
||||
--db-dir '${cfg.dataDir}' --daemon-dir '${config.services.bitcoind.dataDir}' \
|
||||
--electrum-rpc-addr=${toString cfg.address}:${toString cfg.port} ${cfg.extraArgs}
|
||||
--electrum-rpc-addr=${toString cfg.address}:${toString cfg.port} \
|
||||
--daemon-rpc-addr=${toString cfg.daemonrpc} ${cfg.extraArgs}
|
||||
'';
|
||||
User = cfg.user;
|
||||
Group = cfg.group;
|
||||
|
||||
Reference in New Issue
Block a user