Module options
These are the options of the bitcoinix modules in this release, with their types, defaults and examples. Filter the list by name or description in the field below, or use the search in the menu bar to search the whole documentation. The NixOS options are in the NixOS options search.
nix-bitcoin.configVersion
The released nix-bitcoin version whose configuration migrations you have completed.
When upgrading to a backwards-incompatible release, nix-bitcoin will throw an error during evaluation and provide instructions for migrating your config to the new release.
On master, unreleased migrations warn without blocking deployment or requiring acknowledgement. Review them before deploying; warnings cannot be acknowledged individually and repeat while applicable. Values newer than the latest finalized release are rejected. If unset, migration notices are disabled.
Type: null or string
Default:
null
Example:
"0.0.92"
Declared by:
nix-bitcoin.deployment.secretsDir
Directory of local secrets that are transferred to the bitcoinix node on deployment
Type: absolute path
Declared by:
nix-bitcoin.generateSecrets
Automatically generate all required secrets before services are started. Note: Make sure to create a backup of the generated secrets.
Type: boolean
Default:
false
Declared by:
nix-bitcoin.generateSecretsCmds
Bash expressions for generating secrets, run in
nix-bitcoin.secretsDir by the sandboxed setup-secrets service.
Commands have no IP network access and can write only to the secrets
directory and private temporary directories. Temporary files are not
shared with other services. Commands requiring writable executable
memory (such as JIT compilation) or setuid/setgid file modes are blocked.
To generate all secrets separately, supply them before setup-secrets
starts and disable nix-bitcoin.generateSecrets.
Type: attribute set of strings concatenated with “\n”
Default:
{ }
Declared by:
nix-bitcoin.lib
Helpers shared by the bitcoinix modules, defined in
pkgs/lib.nix. defaultHardening holds the systemd sandboxing
settings that most bitcoinix services run with. They deny all IP
traffic, so merge them with allowLocalIPAddresses or
allowAllIPAddresses for a service that needs the network:
systemd.services.<name>.serviceConfig = with config.nix-bitcoin.lib;
defaultHardening // allowLocalIPAddresses;
allowLocalIPAddresses allows localhost and, with netns-isolation,
the namespace addresses 169.254.<addressblock>.0/24. It also hides
the nscd, systemd-resolved and D-Bus sockets (and Avahi’s, when
enabled) from the service, so it
resolves names only from /etc/hosts or through a resolver on
an allowed address.
Type: unspecified value (read only)
Default:
"nix-bitcoin/pkgs/lib.nix"
Declared by:
nix-bitcoin.mkLndconnect
A function to create a lndconnect binary. See the source for further details.
Type: unspecified value (read only)
Default:
<function, args: {authSecretPath, certPath?, enableOnion, getCertPathCmd?, isClnrest?, name, onionService?, port, shebang?}>
Declared by:
nix-bitcoin.netns-isolation.enable
Whether to enable netns isolation.
Type: boolean
Default:
false
Example:
true
Declared by:
nix-bitcoin.netns-isolation.addressblock
The address block N in 169.254.N.0/24, used as the prefix for netns addresses. 169 and 170 aren’t allowed, because those blocks hold cloud metadata addresses.
Type: 8 bit unsigned integer; between 0 and 255 (both inclusive)
Default:
1
Declared by:
nix-bitcoin.netns-isolation.bridgeIp
IP of the netns bridge interface.
Type: unspecified value (read only)
Default:
"169.254.1.10"
Declared by:
nix-bitcoin.netns-isolation.netns
Exposes netns parameters.
Type: unspecified value (read only)
Default:
{ }
Declared by:
nix-bitcoin.netns-isolation.services
Services that run in their own network namespace nb-<name>, keyed by
the name of the service under services, e.g. bitcoind. An entry
takes effect only while that service is enabled. The bitcoinix modules
define the entries for the supported services.
A namespace accepts incoming connections only from itself, from the
host and from the namespaces linked by connections.
Connections from the host come from the bridge address
169.254.<addressblock>.10, so every process in the host network
namespace can reach the service, not only the services listed in
connections.
Services with tor.enforce can also connect only to these addresses.
Type: attribute set of (submodule)
Default:
{ }
Declared by:
nix-bitcoin.netns-isolation.services.<name>.connections
Services whose namespaces may exchange connections with this
service’s namespace. A connection works in both directions:
clightning.connections = [ "bitcoind" ] also lets
bitcoind connect to clightning. Entries for disabled
services are ignored.
Type: list of string
Default:
[ ]
Declared by:
nix-bitcoin.netns-isolation.services.<name>.id
id for the netns, used for the IP address host part and for naming the interfaces. Must be unique. Must be greater than 10.
Type: integer between 11 and 255 (both inclusive)
Declared by:
nix-bitcoin.nodeinfo.enable
Whether to enable nodeinfo.
Type: boolean
Default:
false
Example:
true
Declared by:
nix-bitcoin.onionAddresses.access
This option controls who is allowed to access onion addresses. For example, the following allows user ‘myuser’ to access bitcoind and clightning onion addresses:
{
"myuser" = [ "bitcoind" "clightning" ];
};
The onion hostnames can then be read from
/var/lib/onion-addresses/myuser.
Type: attribute set of list of string
Default:
{ }
Declared by:
nix-bitcoin.onionAddresses.services
Services that can access their onion address via file
/var/lib/onion-addresses/<service>
The file is readable only by the service user.
Type: list of string
Default:
[ ]
Declared by:
nix-bitcoin.onionServices
Tor onion services for incoming connections to bitcoinix services, keyed
by the name of the service under services, e.g. bitcoind.
An entry takes effect only while that service is enabled.
The presets enable-tor.nix and secure-node.nix enable
onion services for the supported services.
Type: attribute set of (submodule)
Default:
{ }
Declared by:
nix-bitcoin.onionServices.<name>.enable
Create an onion service for the given service.
The service must define options address and onionPort (or port).
Type: boolean
Default:
false
Declared by:
nix-bitcoin.onionServices.<name>.externalPort
Override the external port of the onion service.
Type: null or 16 bit unsigned integer; between 0 and 65535 (both inclusive)
Default:
null
Declared by:
nix-bitcoin.onionServices.<name>.public
Make the onion address accessible to the service.
If enabled, the onion service is automatically enabled.
Only available for services that define option getPublicAddressCmd.
Type: boolean
Default:
false
Declared by:
nix-bitcoin.operator.enable
Whether to define a user named operator for convenient interactive access
to bitcoinix features (like bitcoin-cli).
When using nix-bitcoin as part of a larger system config, it makes sense
to set your main system user as the operator, by setting option
nix-bitcoin.operator.name = "MAIN_USER_NAME";.
Type: boolean
Default:
false
Declared by:
nix-bitcoin.operator.allowRunAsUsers
Users as which the operator is allowed to run commands.
Type: list of string
Default:
[ ]
Declared by:
nix-bitcoin.operator.groups
Extra groups of the operatur user.
Type: list of string
Default:
[ ]
Declared by:
nix-bitcoin.operator.name
Name of the operator user.
Type: string
Default:
"operator"
Declared by:
nix-bitcoin.pkgs
The packages that the bitcoinix services run: the packages defined in
pkgs/ and the service packages selected from nixpkgs.
Refer to a package as config.nix-bitcoin.pkgs.<name>, e.g.
config.nix-bitcoin.pkgs.bitcoind.
Type: attribute set
Default:
"nix-bitcoin/pkgs.modulesPkgs"
Declared by:
nix-bitcoin.revision
The bitcoinix git commit that this system is built from.
nixosModules.default of the bitcoinix flake sets this to the flake’s
revision (<rev>-dirty for a checkout with uncommitted changes).
It is null when the flake source has no revision or when the modules
are imported without the flake.
Shown by nodeinfo.
Type: null or string
Default:
null
Example:
"6d209ffe17e13abe15f5d368e18f14436019d317"
Declared by:
nix-bitcoin.secrets
Secret files in nix-bitcoin.secretsDir that the enabled
services use, keyed by file name, with the owner and permissions each
file needs. The services declare their own secrets here.
With nix-bitcoin.setupSecrets, setup-secrets applies these
owners and permissions before the services start. With
nix-bitcoin.secretsSetupMethod = "manual", set them yourself.
Type: attribute set of (submodule)
Default:
{ }
Declared by:
nix-bitcoin.secrets.<name>.allowEmpty
Whether setup-secrets accepts an empty file for this secret.
Otherwise, an empty file fails setup like a missing one.
Type: boolean
Default:
false
Declared by:
nix-bitcoin.secrets.<name>.group
Group of the secret file.
Type: string
Default:
user
Declared by:
nix-bitcoin.secrets.<name>.permissions
Mode of the secret file, in the octal notation of
chmod.
Type: string
Default:
"440"
Declared by:
nix-bitcoin.secrets.<name>.user
User that owns the secret file.
Type: string
Default:
"root"
Declared by:
nix-bitcoin.secretsDir
Directory to store secrets
Type: absolute path
Default:
"/etc/nix-bitcoin-secrets"
Declared by:
nix-bitcoin.secretsSetupMethod
How the secrets in nix-bitcoin.secretsDir are provided.
Evaluation fails while this is null. Values:
"setup-secrets": set automatically whennix-bitcoin.setupSecretsornix-bitcoin.generateSecretsis enabled."nixops": set by the NixOps deployment module."manual": you provide the secrets and set the owners and permissions declared innix-bitcoin.secretsyourself, before the services start.
For any value other than "manual", nix-bitcoin-secrets.target is
started on every activation, and services start after it. A custom
deployment method can set its own value and order its secrets setup
before this target.
Type: null or string
Default:
null
Declared by:
nix-bitcoin.security.dbusHideProcessInformation
Only allow users with group proc to retrieve systemd unit information like
cgroup paths (i.e. (sub)process command lines) via D-Bus.
This mitigates a systemd security issue where (sub)process command lines can be retrieved by services even when their access to /proc is restricted (via ProtectProc).
This option works by restricting the D-Bus method GetUnitProcesses, which
is also used internally by systemctl status.
Type: boolean
Default:
false
Declared by:
nix-bitcoin.setupSecrets
Set permissions for existing secrets in nix-bitcoin.secretsDir
before services are started.
The directory is accessible only to root while permissions are set. A failed run leaves it that way until setup succeeds, so services cannot read any of its secrets. Declared secrets must be writable inside the setup-secrets sandbox; symlinks to files outside the secrets directory can cause setup to fail.
Type: boolean
Default:
false
Declared by:
nix-bitcoin.useVersionLockedPkgs
Use the nixpkgs version locked by this flake for nix-bitcoin.pkgs.
Only relevant if you are using a nixpkgs version for evaluating your system
that differs from the one that is locked by this flake (via input nixpkgs).
If this is the case, enabling this option uses the tested package set
for bitcoinix services, unless you override this flake’s nixpkgs input
(for example with bitcoinix.inputs.nixpkgs.follows).
The downsides are increased evaluation times and increased system
closure size. The system’s nixpkgs.overlays and nixpkgs.config do
not apply to these pinned packages. System evaluation requires
unstable nixpkgs regardless of this option.
If false, the default system pkgs are used. Use an unstable nixpkgs
for your system; release branches are not supported.
All nixpkgs service packages then follow your system’s pin, including
lnd and clightning. Review their versions before updating: downgrades
may be incompatible with existing databases.
Type: boolean
Default:
true
Declared by:
services.backups.enable
Enable backups of node data.
This uses the NixOS duplicity service.
To further configure the backup, you can set NixOS options services.duplicity.*.
The services.duplicity.cleanup.* options are particularly useful.
If a database dump or a bitcoind wallet copy fails, the duplicity unit
still backs up all other files and then fails.
The backup leaves out the Lightning channel databases, because restoring a copy of them can lose all funds in their channels. See the Backups section in docs/services.md.
With nix-bitcoin.generateSecrets, the backups are encrypted with
the generated password backup-encryption-password in
nix-bitcoin.secretsDir. The backups include it, but you need it
to decrypt them. Keep a copy off the node.
Type: boolean
Default:
false
Declared by:
services.backups.destination
Where to back up to.
Type: string
Default:
"file:///var/lib/localBackups"
Declared by:
services.backups.extraFiles
Additional files to be appended to filelist.
Type: list of string
Default:
[ ]
Example:
[
"/var/lib/nginx"
]
Declared by:
services.backups.frequency
Run backup with the given frequency. If null, do not run automatically.
Type: null or string
Default:
null
Declared by:
services.backups.postgresqlDatabases
List of database names to backup. Don’t list the database of Core Lightning when it uses PostgreSQL. A dump is an outdated copy of its channel state, and restoring it can lose all funds in its channels.
Type: list of string
Default:
[ ]
Declared by:
services.backups.with-bulk-data
Whether to also backup Bitcoin blockchain and other bulk data.
Type: boolean
Default:
false
Declared by:
services.bitcoind.enable
Whether to enable Bitcoin daemon.
Type: boolean
Default:
false
Example:
true
Declared by:
services.bitcoind.addnodes
Add nodes to connect to and attempt to keep the connections open
Type: list of string
Default:
[ ]
Example:
[
"ecoc5q34tmbq54wl.onion"
]
Declared by:
services.bitcoind.address
Address to listen for peer connections.
Type: string
Default:
"127.0.0.1"
Declared by:
services.bitcoind.addresstype
The type of addresses to use
Type: null or string
Default:
null
Example:
"bech32"
Declared by:
services.bitcoind.assumevalid
If this block is in the chain assume that it and its ancestors are valid and potentially skip their script verification.
Type: null or string
Default:
null
Example:
"00000000000000000000e5abc3a74fe27dc0ead9c70ea1deb456f11c15fd7bc6"
Declared by:
services.bitcoind.cli
Binary to connect with the bitcoind instance.
Type: package (read only)
Default:
"(See source)"
Declared by:
services.bitcoind.dataDir
The data directory for bitcoind.
Type: absolute path
Default:
"/var/lib/bitcoind"
Declared by:
services.bitcoind.dataDirReadableByGroup
If enabled, the bitcoind service group can read the blocks dir with the
block files and the block index, including the files that bitcoind
creates while it runs. To reach it, the group can search the data dir
and the selected network’s subdirectory. Where these have an ACL,
the group’s rights are added to it, and all other users and groups keep their
effective rights. The blocks dir and the dirs between it and the data
dir must not be symlinks, and symlinks in the blocks dir aren’t followed.
A custom blocksdir in extraConfig isn’t covered.
The bitcoind-group-read service sets this up before each start of bitcoind.
It sets a default ACL, which needs POSIX ACL support on the filesystem of
the blocks dir (on ZFS, acltype=posixacl). Without it, the service logs a
warning, and the group can read only the files that exist when bitcoind starts.
Disabling this option doesn’t revoke the access that it granted, and the
group can still read the files that bitcoind creates later. To revoke it,
run setfacl -P -R -n -m g::-,d:g::- on the blocks dir. On regtest,
signet and testnet4, also run setfacl -P -n -m g::- on the network
subdirectory. Run these commands as the bitcoind user, for example
with runuser -u bitcoin --. A group member can put a symlink
in the data dir. -P keeps setfacl from following one at the end of the
path, and as the bitcoind user, one before it can only lead to that
user’s own files.
Warning: This disables bitcoind’s wallet support.
Type: boolean
Default:
false
Declared by:
services.bitcoind.dbCache
Override the default database cache size in MiB.
Type: null or integer >= 4
Default:
null
Example:
4000
Declared by:
services.bitcoind.disablewallet
Do not load the wallet and disable wallet RPC calls
Type: null or boolean
Default:
null
Declared by:
services.bitcoind.discover
Discover own IP addresses
Type: null or boolean
Default:
null
Declared by:
services.bitcoind.extraConfig
Extra lines appended to bitcoin.conf.
User-supplied extraConfig options are unsupported by bitcoinix. They may override managed settings or bypass security checks. You take full responsibility for their correctness, security and compatibility with bitcoinix. Prefer dedicated NixOS options when available.
Type: strings concatenated with “\n”
Default:
""
Example:
''
par=16
logips=1
''
Declared by:
services.bitcoind.getPublicAddressCmd
Bash expression which outputs the public service address to announce to peers. If left empty, no address is announced.
Type: string
Default:
""
Declared by:
services.bitcoind.group
The group as which to run bitcoind.
Type: string
Default:
"bitcoin"
Declared by:
services.bitcoind.i2p
Enable peer connections via i2p.
With only-outgoing, incoming i2p connections are disabled.
Type: one of false, true, “only-outgoing”
Default:
false
Declared by:
services.bitcoind.listen
Listen for peer connections at address:port
and address:onionPort (if onionPort is set).
Type: boolean
Default:
false
Declared by:
services.bitcoind.listenWhitelisted
Listen for peer connections at address:whitelistedPort.
Peers connected through this socket are automatically whitelisted.
Type: boolean
Default:
false
Declared by:
services.bitcoind.network
Bitcoin network used by the deployment’s services. Use signet or testnet4 for a public test network. Use regtest for a local regression testing network. Evaluation fails if an enabled service is incompatible with the network.
Type: one of “mainnet”, “regtest”, “signet”, “testnet4”
Default:
"mainnet"
Declared by:
services.bitcoind.networkDir
The directory where Bitcoin Core stores data for the selected network.
Type: absolute path (read only)
Default:
dataDir on mainnet, dataDir/network on other networks.
Declared by:
services.bitcoind.onionPort
Port to listen for Tor peer connections. If set, inbound connections to this port are tagged as onion peers.
Type: null or 16 bit unsigned integer; between 0 and 65535 (both inclusive)
Default:
null when the bitcoind onion service is disabled, otherwise 8334 on mainnet, 18445 on regtest, 38334 on signet, 48334 on testnet4.
Declared by:
services.bitcoind.port
Port to listen for peer connections.
Type: 16 bit unsigned integer; between 0 and 65535 (both inclusive)
Default: 8333 on mainnet, 18444 on regtest, 38333 on signet, 48333 on testnet4
Declared by:
services.bitcoind.proxy
Connect through SOCKS5 proxy
Type: null or string
Default:
null
Declared by:
services.bitcoind.prune
Automatically prune block files to stay under the specified target size in MiB. Value 0 disables pruning.
Type: unsigned integer, meaning >=0
Default:
0
Example:
10000
Declared by:
services.bitcoind.rest.enable
Enable the REST interface.
It is served on the RPC address and port without authentication. Every
source allowed by rpc.allowip can query blocks, transactions, the UTXO
set and the mempool, bypassing RPC users and rpcwhitelist.
Type: boolean
Default:
false
Declared by:
services.bitcoind.rest.allowNonLocal
Allow enabling the REST interface when rpc.allowip contains
sources other than localhost and nix-bitcoin’s network namespaces.
These sources get unauthenticated REST access.
For loopback, use 127.0.0.1, 127.0.0.1/32, 127.0.0.0/8,
::1 or ::1/128 in rpc.allowip.
Also accepts rpcallowip and includeconf directives in
extraConfig (see rest.allowUncheckedConfig).
Type: boolean
Default:
false
Declared by:
services.bitcoind.rest.allowUncheckedConfig
Allow enabling the REST interface when extraConfig contains
rpcallowip or includeconf directives. Their effective allowlist
is not checked, so review all raw and included settings first.
Unlike rest.allowNonLocal, this keeps the check of rpc.allowip.
Type: boolean
Default:
false
Declared by:
services.bitcoind.rpc.address
Address to listen for JSON-RPC connections.
Type: string
Default:
"127.0.0.1"
Declared by:
services.bitcoind.rpc.allowip
Allow JSON-RPC connections from specified sources.
Type: list of string
Default:
[
"127.0.0.1"
]
Declared by:
services.bitcoind.rpc.port
Port to listen for JSON-RPC connections.
Type: 16 bit unsigned integer; between 0 and 65535 (both inclusive)
Default: 8332 on mainnet, 18443 on regtest, 38332 on signet, 48332 on testnet4
Declared by:
services.bitcoind.rpc.threads
The number of threads to service RPC calls.
Type: null or 16 bit unsigned integer; between 0 and 65535 (both inclusive)
Default:
null
Declared by:
services.bitcoind.rpc.users
Allowed users for JSON-RPC connections.
Type: attribute set of (submodule)
Default:
{ }
Example:
{
alice = {
passwordHMAC = "f7efda5c189b999524f151318c0c86$d5b51b3beffbc02b724e5d095828e0bc8b2456e9ac8757ae3211a5d9b16a22ae";
rpcwhitelist = [
"sendtoaddress"
"getnewaddress"
];
};
}
Declared by:
services.bitcoind.rpc.users.<name>.name
Username for JSON-RPC connections.
Type: string
Default:
"‹name›"
Example:
"alice"
Declared by:
services.bitcoind.rpc.users.<name>.passwordHMAC
Password HMAC-SHA-256 for JSON-RPC connections. Must be a string of the
format <SALT-HEX>$<HMAC-HEX>.
This value is written to the world-readable Nix store. Any local user
can read it and test password guesses offline. So use a long random
password, like the one that Bitcoin Core’s share/rpcauth/rpcauth.py
generates when you don’t pass a password.
Type: string
Example:
"f7efda5c189b999524f151318c0c86$d5b51b3beffbc02b724e5d095828e0bc8b2456e9ac8757ae3211a5d9b16a22ae"
Declared by:
services.bitcoind.rpc.users.<name>.rpcwhitelist
List of allowed rpc calls for each user. If empty list, rpcwhitelist is disabled for that user.
Type: list of string
Default:
[ ]
Declared by:
services.bitcoind.tor.enforce
Whether to enforce Tor on this service by only allowing connections
from and to localhost and, with netns-isolation, the network namespace
addresses 169.254.<addressblock>.0/24. The service also can’t reach
the local name-resolution sockets (nscd, systemd-resolved, D-Bus,
Avahi), so glibc resolves names itself: from /etc/hosts, and through
a resolver only if one listens on an allowed address.
Type: boolean
Default:
false
Declared by:
services.bitcoind.tor.proxy
Whether to proxy outgoing connections with Tor.
Type: boolean
Default:
false
Declared by:
services.bitcoind.txindex
Enable the transaction index.
Type: boolean
Default:
false
Declared by:
services.bitcoind.user
The user as which to run bitcoind.
Type: string
Default:
"bitcoin"
Declared by:
services.bitcoind.whitelistedPort
See listenWhitelisted.
Type: 16 bit unsigned integer; between 0 and 65535 (both inclusive)
Default:
8335
Declared by:
services.bitcoind.zmqpubrawblock
ZMQ address for zmqpubrawblock notifications
Type: null or string
Default:
null
Example:
"tcp://127.0.0.1:28332"
Declared by:
services.bitcoind.zmqpubrawtx
ZMQ address for zmqpubrawtx notifications
Type: null or string
Default:
null
Example:
"tcp://127.0.0.1:28333"
Declared by:
services.btcpayserver.enable
Whether to enable btcpayserver, a self-hosted Bitcoin payment processor.
Type: boolean
Default:
false
Example:
true
Declared by:
services.btcpayserver.package
The package providing btcpayserver binaries.
Type: package
Default:
"config.nix-bitcoin.pkgs.btcpayserver"
Declared by:
services.btcpayserver.address
Address to listen on.
Type: string
Default:
"127.0.0.1"
Declared by:
services.btcpayserver.dataDir
The data directory for btcpayserver.
Type: absolute path
Default:
"/var/lib/btcpayserver"
Declared by:
services.btcpayserver.group
The group as which to run btcpayserver.
Type: string
Default:
"btcpayserver"
Declared by:
services.btcpayserver.lightningBackend
The lightning node implementation to use.
With clightning, BTCPay Server has full control of the Lightning node,
including its funds. It uses lightningd’s RPC socket, which allows every
method, like pay, withdraw and fundchannel.
With lnd, BTCPay Server gets its own macaroon, which can’t send funds
or open or close channels. Use lnd when you want BTCPay Server limited.
Neither backend limits a hot wallet in BTCPay Server. Switching away from
clightning stops Core Lightning unless services.clightning.enable is set,
and then lnd needs another port than Core Lightning.
See docs/services.md.
Type: null or one of “clightning”, “lnd”
Default:
null
Declared by:
services.btcpayserver.port
Port to listen on.
Type: 16 bit unsigned integer; between 0 and 65535 (both inclusive)
Default:
23000
Declared by:
services.btcpayserver.rootpath
The prefix for root-relative btcpayserver URLs.
Type: null or string
Default:
null
Example:
"btcpayserver"
Declared by:
services.btcpayserver.tor.enforce
Whether to enforce Tor on this service by only allowing connections
from and to localhost and, with netns-isolation, the network namespace
addresses 169.254.<addressblock>.0/24. The service also can’t reach
the local name-resolution sockets (nscd, systemd-resolved, D-Bus,
Avahi), so glibc resolves names itself: from /etc/hosts, and through
a resolver only if one listens on an allowed address.
Type: boolean
Default:
false
Declared by:
services.btcpayserver.user
The user as which to run btcpayserver.
Type: string
Default:
"btcpayserver"
Declared by:
services.charge-lnd.enable
Whether to enable charge-lnd, policy-based fee manager.
Type: boolean
Default:
false
Example:
true
Declared by:
services.charge-lnd.extraFlags
Extra flags to pass to the charge-lnd command.
Type: list of string
Default:
[ ]
Example:
[
"--verbose"
"--dry-run"
]
Declared by:
services.charge-lnd.interval
Systemd calendar expression when to adjust fees.
See systemd.time(7) for possible values.
Default is once a day.
Type: string
Default:
"*-*-* 04:00:00"
Example:
"hourly"
Declared by:
services.charge-lnd.policies
Policy definitions in INI format.
See https://github.com/accumulator/charge-lnd/blob/master/README.md#usage for possible properties and parameters.
Policies are evaluated from top to bottom.
The first matching policy (or default) is applied.
Type: strings concatenated with “\n”
Default:
""
Example:
''
[discourage-routing-out-of-balance]
chan.max_ratio = 0.1
chan.min_capacity = 250000
strategy = static
base_fee_msat = 10000
fee_ppm = 500
[encourage-routing-to-balance]
chan.min_ratio = 0.9
chan.min_capacity = 250000
strategy = static
base_fee_msat = 1
fee_ppm = 2
[default]
strategy = ignore
''
Declared by:
services.charge-lnd.randomDelay
Random delay to add to scheduled time.
Type: string
Default:
"1h"
Declared by:
services.clightning.enable
Whether to enable Core Lightning (CLN), a specification compliant Lightning Network implementation in C.
Type: boolean
Default:
false
Example:
true
Declared by:
services.clightning.package
The package providing Core Lightning binaries.
Type: package
Default:
"config.nix-bitcoin.pkgs.clightning"
Declared by:
services.clightning.address
Address to listen for peer connections.
Type: string
Default:
"127.0.0.1"
Declared by:
services.clightning.always-use-proxy
Always use the proxy, even to connect to normal IP addresses. You can still connect to Unix domain sockets manually. This also disables all DNS lookups, to avoid leaking address information.
Type: boolean
Default:
false
Declared by:
services.clightning.cli
Binary to connect with the Core Lightning instance.
Type: unspecified value (read only)
Default:
"(See source)"
Declared by:
services.clightning.dataDir
The data directory for Core Lightning.
Type: absolute path
Default:
"/var/lib/clightning"
Declared by:
services.clightning.extraConfig
Extra lines appended to the configuration file.
User-supplied extraConfig options are unsupported by bitcoinix. They may override managed settings or bypass security checks. You take full responsibility for their correctness, security and compatibility with bitcoinix. Prefer dedicated NixOS options when available.
See all available options at
https://github.com/ElementsProject/lightning/blob/master/doc/lightningd-config.5.md
or by running lightningd --help.
Type: strings concatenated with “\n”
Default:
""
Example:
''
alias=mynode
''
Declared by:
services.clightning.getPublicAddressCmd
Bash expression which outputs the public service address to announce to peers. If left empty, no address is announced.
Type: string
Default:
""
Declared by:
services.clightning.group
The group as which to run Core Lightning.
Type: string
Default:
"clightning"
Declared by:
services.clightning.networkDir
The network data directory.
Type: unspecified value (read only)
Default:
"/var/lib/clightning/bitcoin"
Declared by:
services.clightning.plugins.clboss.enable
Whether to enable CLBOSS (Core Lightning plugin). See also: https://github.com/ksedgwic/clboss#operating
Type: boolean
Default:
false
Declared by:
services.clightning.plugins.clboss.package
The package providing clboss binaries.
Type: package
Default:
"config.nix-bitcoin.pkgs.clboss"
Declared by:
services.clightning.plugins.clboss.max-channel
The maximum size (in satoshi) of channels created by CLBOSS.
Type: positive integer, meaning >0
Default:
16777215
Declared by:
services.clightning.plugins.clboss.min-channel
The minimum size (in satoshi) of channels created by CLBOSS.
Type: positive integer, meaning >0
Default:
500000
Declared by:
services.clightning.plugins.clboss.min-onchain
Target amount (in satoshi) that CLBOSS will leave on-chain. clboss will only open new channels if the funds in your Core Lightning wallet are larger than this amount.
Type: positive integer, meaning >0
Default:
30000
Declared by:
services.clightning.plugins.clboss.zerobasefee
require: set base_fee to 0.
allow: set base_fee according to the CLBOSS heuristics, which may include value 0.
disallow: set base_fee to according to the CLBOSS heuristics, with a minimum value of 1.
Type: one of “require”, “allow”, “disallow”
Default:
"allow"
Declared by:
services.clightning.plugins.clnrest.enable
Enable clnrest (Core Lightning plugin).
clnrest provides a Core Lightning REST API, using Core Lightning RPC calls as its backend. It also broadcasts Core Lightning notifications to listeners connected to its websocket server.
See here for all available options:
https://docs.corelightning.org/docs/rest
Extra options can be set via services.clightning.extraConfig.
Type: boolean
Default:
false
Declared by:
services.clightning.plugins.clnrest.package
The package providing clnrest binaries.
Type: package
Default:
"config.nix-bitcoin.pkgs.clightning-plugins.clnrest"
Declared by:
services.clightning.plugins.clnrest.address
Address to listen for REST connections.
Type: string
Default:
"127.0.0.1"
Declared by:
services.clightning.plugins.clnrest.createAdminRune
Create a rune with admin permissions at path ${config.services.clightning.networkDir}/admin-rune.
Type: boolean
Default:
true
Declared by:
services.clightning.plugins.clnrest.lnconnect.enable
Add a lnconnect-clnrest binary to the system environment which prints
connection info for Core Lightning clients.
See: https://github.com/LN-Zap/lndconnect
Usage:
# Print QR code
lnconnect-clnrest
# Print URL
lnconnect-clnrest --url
This does not change the listen address of the clnrest server
(services.clightning.plugins.clnrest.address), which is localhost by default.
To connect a client, enable
services.clightning.plugins.clnrest.lnconnect.onion, use the
WireGuard preset, or set the address yourself.
Type: boolean
Default:
false
Declared by:
services.clightning.plugins.clnrest.lnconnect.onion
Create an onion service for the clnrest server, which is used by lnconnect.
Type: boolean
Default:
false
Declared by:
services.clightning.plugins.clnrest.port
REST server port.
Type: 16 bit unsigned integer; between 0 and 65535 (both inclusive)
Default:
3010
Declared by:
services.clightning.plugins.currencyrate.enable
Whether to enable Currencyrate (Core Lightning plugin).
Type: boolean
Default:
false
Example:
true
Declared by:
services.clightning.plugins.feeadjuster.enable
Enable feeadjuster (Core Lightning plugin). This plugin auto-updates channel fees to keep channels balanced.
See here for all available options:
https://github.com/lightningd/plugins/blob/master/feeadjuster/feeadjuster.py
Extra options can be set via services.clightning.extraConfig.
Type: boolean
Default:
false
Declared by:
services.clightning.plugins.feeadjuster.adjustDaily
Automatically update fees daily.
Type: boolean
Default:
true
Declared by:
services.clightning.plugins.feeadjuster.adjustOnForward
Automatically update fees on forward events.
Type: boolean
Default:
false
Declared by:
services.clightning.plugins.feeadjuster.fuzz
Enable update threshold randomization and hysteresis.
Type: boolean
Default:
true
Declared by:
services.clightning.plugins.feeadjuster.method
Adjustment method to calculate channel fees.
soft: less difference when adjusting fees.
hard: greater difference when adjusting fees.
Type: one of “soft”, “default”, “hard”
Default:
"default"
Declared by:
services.clightning.plugins.monitor.enable
Whether to enable Monitor (Core Lightning plugin).
Type: boolean
Default:
false
Example:
true
Declared by:
services.clightning.plugins.rebalance.enable
Whether to enable Rebalance (Core Lightning plugin).
Type: boolean
Default:
false
Example:
true
Declared by:
services.clightning.plugins.trustedcoin.enable
Whether to enable Trustedcoin (Core Lightning plugin).
Warning: With tor.proxy disabled, trustedcoin fetches block data
over clearnet, so option services.clightning.tor.enforce is
automatically disabled for the whole clightning service.
Type: boolean
Default:
false
Declared by:
services.clightning.plugins.trustedcoin.package
The package providing trustedcoin binaries.
Type: package
Default:
"config.nix-bitcoin.pkgs.trustedcoin"
Declared by:
services.clightning.plugins.trustedcoin.tor.proxy
Whether to proxy outgoing connections with Tor.
Warning: When disabled, option services.clightning.tor.enforce is
automatically disabled for the whole clightning service, because
trustedcoin needs clearnet HTTPS connections to its block explorers.
Type: boolean
Default:
false
Declared by:
services.clightning.plugins.zmq.enable
Whether to enable ZMQ (Core Lightning plugin).
Type: boolean
Default:
false
Example:
true
Declared by:
services.clightning.plugins.zmq.channel-opened
Endpoint for channel-opened
Type: null or string
Default:
null
Declared by:
services.clightning.plugins.zmq.connect
Endpoint for connect
Type: null or string
Default:
null
Declared by:
services.clightning.plugins.zmq.disconnect
Endpoint for disconnect
Type: null or string
Default:
null
Declared by:
services.clightning.plugins.zmq.forward-event
Endpoint for forward-event
Type: null or string
Default:
null
Declared by:
services.clightning.plugins.zmq.invoice-payment
Endpoint for invoice-payment
Type: null or string
Default:
null
Declared by:
services.clightning.plugins.zmq.sendpay-failure
Endpoint for sendpay-failure
Type: null or string
Default:
null
Declared by:
services.clightning.plugins.zmq.sendpay-success
Endpoint for sendpay-success
Type: null or string
Default:
null
Declared by:
services.clightning.plugins.zmq.warning
Endpoint for warning
Type: null or string
Default:
null
Declared by:
services.clightning.port
Port to listen for peer connections.
Type: 16 bit unsigned integer; between 0 and 65535 (both inclusive)
Default:
9735
Declared by:
services.clightning.proxy
Socks proxy for connecting to Tor nodes (or for all connections if option always-use-proxy is set).
Type: null or string
Default:
null
Declared by:
services.clightning.replication.enable
Enable live replication of the Core Lightning database. This prevents losing off-chain funds when the primary wallet file becomes inaccessible.
For setting the destination, you can either define option sshfs.destination
or local.directory.
The replica filename is lightningd-signet.sqlite3 on signet,
lightningd-testnet4.sqlite3 on testnet4, and lightningd.sqlite3 on
mainnet and regtest. Use separate destinations for mainnet and regtest.
With encrypt, the destination holds a lightningd-db directory
containing the encrypted files and gocryptfs metadata.
See also: https://docs.corelightning.org/docs/backup
Type: boolean
Default:
false
Declared by:
services.clightning.replication.encrypt
Whether to encrypt the replicated database with gocryptfs.
The encryption password is automatically generated and stored
in file $secretsDir/clightning-replication-password.
Type: boolean
Default:
false
Declared by:
services.clightning.replication.local.directory
This option can be specified instead of sshfs.destination to enable
replication to a local directory.
If local.setupDirectory is disabled, the directory
- must already exist when
clightning.service(orclightning-replication-mounts.serviceifencryptistrue) starts. - must have write permissions for the
clightninguser.
This option is also useful if you want to use a custom remote destination, like a NFS or SMB share.
clightning.service requires the mounts for this directory, and so does
clightning-replication-mounts.service if encrypt is true. They don’t
start while a mount is missing. systemd can only wait for the mounts it
knows, so declare the disk or share in fileSystems. It also doesn’t
follow symlinks, so set this to the mount point or a directory below it.
Type: null or absolute path
Default:
null
Example:
"/var/backup/clightning"
Declared by:
services.clightning.replication.local.setupDirectory
Create local.directory if it doesn’t exist and set write permissions
for the clightning user.
Type: boolean
Default:
true
Declared by:
services.clightning.replication.sshfs.destination
The SSH destination for which a SSHFS will be mounted.
directory is relative to the home of user.
An SSH key is automatically generated and stored in file
$secretsDir/clightning-replication-ssh-key.
The SSH server must allow logins via this key.
I.e., the authorized_keys file of user must contain
$secretsDir/clightning-replication-ssh-key.pub.
The host key of the SSH server must be known in advance, e.g. via
programs.ssh.knownHosts. Otherwise mounting fails.
Don’t set StrictHostKeyChecking=no in sshOptions: it allows any
host on the network path to impersonate the server and receive the
replicated database.
Type: null or string
Default:
null
Example:
"user@10.0.0.1:directory"
Declared by:
services.clightning.replication.sshfs.port
SSH port of the remote server.
Type: 16 bit unsigned integer; between 0 and 65535 (both inclusive)
Default:
22
Declared by:
services.clightning.replication.sshfs.sshOptions
SSH options used for mounting the SSHFS.
Type: list of string
Default:
[
"reconnect"
"ServerAliveInterval=50"
]
Declared by:
services.clightning.tor.enforce
Whether to enforce Tor on this service by only allowing connections
from and to localhost and, with netns-isolation, the network namespace
addresses 169.254.<addressblock>.0/24. The service also can’t reach
the local name-resolution sockets (nscd, systemd-resolved, D-Bus,
Avahi), so glibc resolves names itself: from /etc/hosts, and through
a resolver only if one listens on an allowed address.
Type: boolean
Default:
false
Declared by:
services.clightning.tor.proxy
Whether to proxy outgoing connections with Tor.
Type: boolean
Default:
false
Declared by:
services.clightning.useBcliPlugin
Use bitcoind (via plugin bcli) for getting block data.
This option is disabled by plugins that use other sources for
fetching block data, like trustedcoin.
Type: boolean
Default:
true
Declared by:
services.clightning.user
The user as which to run Core Lightning.
Type: string
Default:
"clightning"
Declared by:
services.clightning.wallet
Wallet data scheme (sqlite3 or postgres) and location/connection parameters, as fully qualified data source name.
Type: null or string
Default:
null
Example:
"sqlite3:///var/lib/clightning/bitcoin/lightningd.sqlite3"
Declared by:
services.electrs.enable
Whether to enable electrs, an Electrum server implemented in Rust.
Type: boolean
Default:
false
Example:
true
Declared by:
services.electrs.address
Address to listen for RPC connections.
Type: string
Default:
"127.0.0.1"
Declared by:
services.electrs.dataDir
The data directory for electrs.
Type: absolute path
Default:
"/var/lib/electrs"
Declared by:
services.electrs.extraArgs
Extra command line arguments passed to electrs.
Type: strings concatenated with “ “
Default:
""
Declared by:
services.electrs.group
The group as which to run electrs.
Type: string
Default:
"electrs"
Declared by:
services.electrs.monitoringPort
Prometheus monitoring port.
Type: 16 bit unsigned integer; between 0 and 65535 (both inclusive)
Default:
4224
Declared by:
services.electrs.port
Port to listen for RPC connections.
Type: 16 bit unsigned integer; between 0 and 65535 (both inclusive)
Default:
50001
Declared by:
services.electrs.tor.enforce
Whether to enforce Tor on this service by only allowing connections
from and to localhost and, with netns-isolation, the network namespace
addresses 169.254.<addressblock>.0/24. The service also can’t reach
the local name-resolution sockets (nscd, systemd-resolved, D-Bus,
Avahi), so glibc resolves names itself: from /etc/hosts, and through
a resolver only if one listens on an allowed address.
Type: boolean
Default:
false
Declared by:
services.electrs.user
The user as which to run electrs.
Type: string
Default:
"electrs"
Declared by:
services.fulcrum.enable
Enable fulcrum, an Electrum server implemented in C++.
Compared to electrs, fulcrum has a 3x larger database size but can serve arbitrary address queries instantly.
fulcrum also enables txindex in bitcoind (this is a requirement),
which increases the bitcoind datadir size by 8% of the blocks size.
This module disables peering (a distributed list of electrum servers that can
be queried by clients), but you can manually enable it via option
extraConfig.
Type: boolean
Default:
false
Declared by:
services.fulcrum.address
Address to listen for RPC connections.
Type: string
Default:
"127.0.0.1"
Declared by:
services.fulcrum.dataDir
The data directory for fulcrum.
Type: absolute path
Default:
"/var/lib/fulcrum"
Declared by:
services.fulcrum.extraConfig
Extra lines appended to the configuration file.
User-supplied extraConfig options are unsupported by bitcoinix. They may override managed settings or bypass security checks. You take full responsibility for their correctness, security and compatibility with bitcoinix. Prefer dedicated NixOS options when available.
See all available options at https://github.com/cculianu/Fulcrum/blob/master/doc/fulcrum-example-config.conf
Type: strings concatenated with “\n”
Default:
""
Example:
''
peering = true
''
Declared by:
services.fulcrum.group
The group as which to run fulcrum.
Type: string
Default:
"fulcrum"
Declared by:
services.fulcrum.port
Port to listen for RPC connections.
Type: 16 bit unsigned integer; between 0 and 65535 (both inclusive)
Default:
50001
Declared by:
services.fulcrum.tor.enforce
Whether to enforce Tor on this service by only allowing connections
from and to localhost and, with netns-isolation, the network namespace
addresses 169.254.<addressblock>.0/24. The service also can’t reach
the local name-resolution sockets (nscd, systemd-resolved, D-Bus,
Avahi), so glibc resolves names itself: from /etc/hosts, and through
a resolver only if one listens on an allowed address.
Type: boolean
Default:
false
Declared by:
services.fulcrum.user
The user as which to run fulcrum.
Type: string
Default:
"fulcrum"
Declared by:
services.hardware-wallets.group
Group the hardware wallet udev rules apply to.
Type: string
Default:
"hardware-wallets"
Declared by:
services.hardware-wallets.ledger
If enabled, the ledger udev rules will be installed.
Type: boolean
Default:
false
Declared by:
services.hardware-wallets.trezor
If enabled, the trezor udev rules will be installed.
Type: boolean
Default:
false
Declared by:
services.hardware-wallets.trezorBridge
Run the Trezor Bridge (trezord) for apps that reach the Trezor through it.
Requires services.hardware-wallets.trezor. HWI and trezorctl open
the device directly and don’t need the bridge.
The bridge serves an HTTP API without authentication on 127.0.0.1:21325.
Every local user and service can then use the Trezor through it, not only
members of services.hardware-wallets.group. For example, they can
read its public keys while it’s unlocked.
Type: boolean
Default:
false
Declared by:
services.lnd.enable
Whether to enable Lightning Network daemon, a Lightning Network implementation in Go.
Type: boolean
Default:
false
Example:
true
Declared by:
services.lnd.package
The package providing lnd binaries.
Type: package
Default:
"config.nix-bitcoin.pkgs.lnd"
Declared by:
services.lnd.address
Address to listen for peer connections
Type: string
Default:
"127.0.0.1"
Declared by:
services.lnd.certPath
LND TLS certificate path.
Type: unspecified value (read only)
Default:
"/etc/nix-bitcoin-secrets/lnd-cert"
Declared by:
services.lnd.certificate.extraDomains
Extra subjectAltName domain names added to the certificate.
This works the same as lnd option tlsextradomain.
Type: list of string
Default:
[ ]
Example:
[
"example.com"
]
Declared by:
services.lnd.certificate.extraIPs
Extra subjectAltName IPs added to the certificate.
This works the same as lnd option tlsextraip.
Type: list of string
Default:
[ ]
Example:
[
"60.100.0.1"
]
Declared by:
services.lnd.cli
Binary to connect with the lnd instance.
Type: unspecified value
Default:
"(See source)"
Declared by:
services.lnd.dataDir
The data directory for LND.
Type: absolute path
Default:
"/var/lib/lnd"
Declared by:
services.lnd.extraConfig
Extra lines appended to lnd.conf.
User-supplied extraConfig options are unsupported by bitcoinix. They may override managed settings or bypass security checks. You take full responsibility for their correctness, security and compatibility with bitcoinix. Prefer dedicated NixOS options when available.
See here for all available options: https://github.com/lightningnetwork/lnd/blob/master/sample-lnd.conf
Type: strings concatenated with “\n”
Default:
""
Example:
''
autopilot.active=1
''
Declared by:
services.lnd.getPublicAddressCmd
Bash expression which outputs the public service address to announce to peers. If left empty, no address is announced.
Type: string
Default:
""
Declared by:
services.lnd.group
The group as which to run LND.
Type: string
Default:
"lnd"
Declared by:
services.lnd.lndconnect.enable
Add a lndconnect binary to the system environment which prints
connection info for lnd clients.
See: https://github.com/LN-Zap/lndconnect
Usage:
# Print QR code
lndconnect
# Print URL
lndconnect --url
This does not change the listen address of the lnd REST server
(services.lnd.restAddress), which is localhost by default.
To connect a client, enable services.lnd.lndconnect.onion, use
the WireGuard preset, or set services.lnd.restAddress yourself.
Type: boolean
Default:
false
Declared by:
services.lnd.lndconnect.onion
Create an onion service for the lnd REST server, which is used by lndconnect.
Type: boolean
Default:
false
Declared by:
services.lnd.macaroons
Extra macaroons, created at /run/lnd/<name>.macaroon when lnd starts.
Type: attribute set of (submodule)
Default:
{ }
Declared by:
services.lnd.macaroons.<name>.optionalPermissions
List of uri permissions that the macaroon gets only when lnd has their RPC.
Some RPCs, like those of walletrpc, exist only when lnd’s package has
their build tag. When lnd lacks the RPC, the macaroon doesn’t get the
permission, and lnd’s start logs a warning.
Type: string
Default:
""
Example:
''
{"entity":"uri","action":"/walletrpc.WalletKit/ListUnspent"}
''
Declared by:
services.lnd.macaroons.<name>.permissions
List of granted macaroon permissions.
lnd’s start fails when lnd lacks the RPC of a uri permission.
Type: string
Example:
''
{"entity":"info","action":"read"},{"entity":"onchain","action":"read"}
''
Declared by:
services.lnd.macaroons.<name>.rootKeyId
The ID of the macaroon’s own lnd root key. A change of the name, user, permissions or optional permissions gives a new ID, which revokes the copies of the previous macaroon.
Type: string (read only)
Default: Derived from the name, user and both lists of permissions
Declared by:
services.lnd.macaroons.<name>.user
User who owns the macaroon. Only this user can read it.
Type: string
Declared by:
services.lnd.networkDir
The network data directory.
Type: unspecified value (read only)
Default:
"/var/lib/lnd/chain/bitcoin/mainnet"
Declared by:
services.lnd.port
Port to listen for peer connections
Type: 16 bit unsigned integer; between 0 and 65535 (both inclusive)
Default:
9735
Declared by:
services.lnd.restAddress
Address to listen for REST connections.
Type: string
Default:
"127.0.0.1"
Declared by:
services.lnd.restPort
Port to listen for REST connections.
Type: 16 bit unsigned integer; between 0 and 65535 (both inclusive)
Default:
8080
Declared by:
services.lnd.rpcAddress
Address to listen for RPC connections.
Type: string
Default:
"127.0.0.1"
Declared by:
services.lnd.rpcPort
Port to listen for gRPC connections.
Type: 16 bit unsigned integer; between 0 and 65535 (both inclusive)
Default:
10009
Declared by:
services.lnd.tor.enforce
Whether to enforce Tor on this service by only allowing connections
from and to localhost and, with netns-isolation, the network namespace
addresses 169.254.<addressblock>.0/24. The service also can’t reach
the local name-resolution sockets (nscd, systemd-resolved, D-Bus,
Avahi), so glibc resolves names itself: from /etc/hosts, and through
a resolver only if one listens on an allowed address.
Type: boolean
Default:
false
Declared by:
services.lnd.tor.proxy
Whether to proxy outgoing connections with Tor.
Type: boolean
Default:
false
Declared by:
services.lnd.tor-socks
Socks proxy for connecting to Tor nodes
Type: null or string
Default:
null
Declared by:
services.lnd.user
The user as which to run LND.
Type: string
Default:
"lnd"
Declared by:
services.mempool.enable
Enable Mempool, a fully featured Bitcoin visualizer, explorer, and API service.
Note: Mempool enables txindex in bitcoind (this is a requirement).
This module has two components:
-
A backend service (systemd service
mempool) -
An optional web interface run by nginx, defined by options
services.mempool.frontend.*. The frontend is enabled by default when mempool is enabled. For details, seeservices.mempool.frontend.enable.
Type: boolean
Default:
false
Declared by:
services.mempool.package
The package providing mempool binaries.
Type: package
Default:
"config.nix-bitcoin.pkgs.mempool-backend"
Declared by:
services.mempool.address
Mempool backend address.
Type: string
Default:
"127.0.0.1"
Declared by:
services.mempool.database.name
Database name.
Type: string
Default:
"mempool"
Declared by:
services.mempool.electrumServer
The Electrum server to use for fetching address information.
Possible options:
- electrs: Small database size, slow when querying new addresses.
- fulcrum: Large database size, quickly serves arbitrary address queries.
Type: one of “electrs”, “fulcrum”
Default:
"electrs"
Declared by:
services.mempool.frontend.enable
Enable the mempool frontend (web interface).
This starts a simple nginx instance, configured for local usage with
settings similar to the mempool/frontend Docker image.
IMPORTANT:
If you want to expose the mempool frontend to the internet, you
should create a custom nginx config that includes TLS, backend caching, rate limiting
and performance tuning.
For this task, reuse the config snippets from option services.mempool.frontend.nginxConfig.
Historical example: https://github.com/fort-nix/nixbitcoin.org/blob/master/website/mempool.nix
contains a mempool nginx config for public hosting from the predecessor project.
Type: boolean
Default:
false
Declared by:
services.mempool.frontend.address
HTTP server address.
Type: string
Default:
"127.0.0.1"
Declared by:
services.mempool.frontend.nginxConfig
An attrset of nginx config snippets for assembling a custom
mempool nginx config.
For details, see the source comments at the point of definition.
Type: unspecified value (read only)
Default:
"(See source)"
Declared by:
services.mempool.frontend.port
HTTP server port.
Type: 16 bit unsigned integer; between 0 and 65535 (both inclusive)
Default:
60845
Declared by:
services.mempool.frontend.settings
Mempool frontend settings.
See here for available options:
https://github.com/mempool/mempool/blob/master/frontend/src/app/services/state.service.ts
(interface Env and defaultEnv)
Type: attribute set of anything
Default:
{ }
Example:
{
MEMPOOL_WEBSITE_URL = "mempool.mynode.org";
TESTNET_ENABLED = true;
}
Declared by:
services.mempool.frontend.staticContentRoot
Path of the static frontend content root.
Type: absolute path
Default:
"config.nix-bitcoin.pkgs.mempool-frontend"
Declared by:
services.mempool.group
The group as which to run Mempool.
Type: string
Default:
"mempool"
Declared by:
services.mempool.port
Mempool backend port.
Type: 16 bit unsigned integer; between 0 and 65535 (both inclusive)
Default:
8999
Declared by:
services.mempool.settings
Mempool backend settings. See here for available options: https://github.com/mempool/mempool/blob/master/backend/src/config.ts
CORE_RPC.PASSWORD can’t be set here because these settings are copied
to the world-readable Nix store. mempool reads the password at startup from
bitcoin-rpcpassword-mempool in the secrets dir (nix-bitcoin.secretsDir).
Type: attribute set of attribute set of anything
Default:
{ }
Example:
{
MEMPOOL = {
POLL_RATE_MS = 3000;
STDOUT_LOG_MIN_PRIORITY = "debug";
};
PRICE_DATA_SERVER = {
CLEARNET_URL = "https://myserver.org/prices";
};
}
Declared by:
services.mempool.tor.enforce
Whether to enforce Tor on this service by only allowing connections
from and to localhost and, with netns-isolation, the network namespace
addresses 169.254.<addressblock>.0/24. The service also can’t reach
the local name-resolution sockets (nscd, systemd-resolved, D-Bus,
Avahi), so glibc resolves names itself: from /etc/hosts, and through
a resolver only if one listens on an allowed address.
Type: boolean
Default:
false
Declared by:
services.mempool.tor.proxy
Whether to proxy outgoing connections with Tor.
Type: boolean
Default:
false
Declared by:
services.mempool.user
The user as which to run Mempool.
Type: string
Default:
"mempool"
Declared by:
services.nbxplorer.package
The package providing nbxplorer binaries.
Type: package
Default:
"config.nix-bitcoin.pkgs.nbxplorer"
Declared by:
services.nbxplorer.address
Address to listen on.
Type: string
Default:
"127.0.0.1"
Declared by:
services.nbxplorer.dataDir
The data directory for nbxplorer.
Type: absolute path
Default:
"/var/lib/nbxplorer"
Declared by:
services.nbxplorer.group
The group as which to run nbxplorer.
Type: string
Default:
"nbxplorer"
Declared by:
services.nbxplorer.port
Port to listen on.
Type: 16 bit unsigned integer; between 0 and 65535 (both inclusive)
Default:
24444
Declared by:
services.nbxplorer.tor.enforce
Whether to enforce Tor on this service by only allowing connections
from and to localhost and, with netns-isolation, the network namespace
addresses 169.254.<addressblock>.0/24. The service also can’t reach
the local name-resolution sockets (nscd, systemd-resolved, D-Bus,
Avahi), so glibc resolves names itself: from /etc/hosts, and through
a resolver only if one listens on an allowed address.
Type: boolean
Default:
false
Declared by:
services.nbxplorer.user
The user as which to run nbxplorer.
Type: string
Default:
"nbxplorer"
Declared by:
services.rtl.enable
Whether to enable Ride The Lightning, a web interface for LND and Core Lightning.
Type: boolean
Default:
false
Example:
true
Declared by:
services.rtl.address
IP address of the web interface.
Type: string
Default:
"127.0.0.1"
Declared by:
services.rtl.dataDir
The data directory for RTL.
Type: absolute path
Default:
"/var/lib/rtl"
Declared by:
services.rtl.extraCurrency
Currency code (ISO 4217) of the extra currency used for displaying balances.
When set, this option enables online currency rate fetching.
Warning: Rate fetching requires outgoing clearnet connections, so option
tor.enforce is automatically disabled.
Type: null or string
Default:
null
Example:
"USD"
Declared by:
services.rtl.group
The group as which to run RTL.
Type: string
Default:
"rtl"
Declared by:
services.rtl.nightTheme
Enable the Night UI Theme.
Type: boolean
Default:
false
Declared by:
services.rtl.nodes.clightning.enable
Enable the Core Lightning node interface.
Type: boolean
Default:
false
Declared by:
services.rtl.nodes.clightning.extraConfig
Extra Core Lightning node configuration.
User-supplied extraConfig options are unsupported by bitcoinix. They may override managed settings or bypass security checks. You take full responsibility for their correctness, security and compatibility with bitcoinix. Prefer dedicated NixOS options when available.
See here for all available options: https://github.com/Ride-The-Lightning/RTL/blob/master/.github/docs/Application_configurations.md
Type: attribute set of anything
Default:
{ }
Example:
{
Settings = {
logLevel = "DEBUG";
userPersona = "MERCHANT";
};
}
Declared by:
services.rtl.nodes.lnd.enable
Enable the lnd node interface.
Type: boolean
Default:
false
Declared by:
services.rtl.nodes.lnd.extraConfig
Extra lnd node configuration.
User-supplied extraConfig options are unsupported by bitcoinix. They may override managed settings or bypass security checks. You take full responsibility for their correctness, security and compatibility with bitcoinix. Prefer dedicated NixOS options when available.
See here for all available options: https://github.com/Ride-The-Lightning/RTL/blob/master/.github/docs/Application_configurations.md
Type: attribute set of anything
Default:
{ }
Example:
{
Settings = {
logLevel = "DEBUG";
userPersona = "MERCHANT";
};
}
Declared by:
services.rtl.nodes.reverseOrder
Reverse the order of nodes shown in the UI. By default, Core Lightning is shown before LND.
Type: boolean
Default:
false
Declared by:
services.rtl.port
Port of the web interface.
Type: 16 bit unsigned integer; between 0 and 65535 (both inclusive)
Default:
3000
Declared by:
services.rtl.tor.enforce
Whether to enforce Tor on this service by only allowing connections
from and to localhost and, with netns-isolation, the network namespace
addresses 169.254.<addressblock>.0/24. The service also can’t reach
the local name-resolution sockets (nscd, systemd-resolved, D-Bus,
Avahi), so glibc resolves names itself: from /etc/hosts, and through
a resolver only if one listens on an allowed address.
Type: boolean
Default:
false
Declared by:
services.rtl.user
The user as which to run RTL.
Type: string
Default:
"rtl"
Declared by:
services.unbeholden-lnurl.enable
Whether to enable Unbeholden LNURL, a Lightning Address server.
Type: boolean
Default:
false
Example:
true
Declared by:
services.unbeholden-lnurl.package
The package providing Unbeholden LNURL.
Type: package
Default:
"config.nix-bitcoin.pkgs.unbeholden-lnurl"
Declared by:
services.unbeholden-lnurl.address
HTTP server address.
Type: string
Default:
"127.0.0.1"
Declared by:
services.unbeholden-lnurl.backend
The local Lightning node that creates invoices and pays vouchers.
Type: one of “lnd”, “clightning”
Default:
"lnd"
Declared by:
services.unbeholden-lnurl.dataDir
The data directory, holding settlement cursors, voucher claims and zap receipts.
Type: absolute path
Default:
"/var/lib/unbeholden-lnurl"
Declared by:
services.unbeholden-lnurl.group
The group as which to run Unbeholden LNURL.
Type: string
Default:
"config.services.unbeholden-lnurl.user"
Declared by:
services.unbeholden-lnurl.port
HTTP server port.
Type: 16 bit unsigned integer; between 0 and 65535 (both inclusive)
Default:
8081
Declared by:
services.unbeholden-lnurl.settings
Unbeholden LNURL configuration. See the
example config.
listen, state_dir and the node connection are set by this module.
The config is world-readable in the Nix store: put secrets in files.
Type: open submodule of (YAML 1.1 value)
Default:
{ }
Declared by:
services.unbeholden-lnurl.settings.addresses
Lightning Addresses by user name, or * for any name.
Type: attribute set of (open submodule of (YAML 1.1 value))
Default:
{ }
Declared by:
services.unbeholden-lnurl.settings.addresses.<name>.max_sendable
Maximum amount in millisatoshis.
Type: positive integer, meaning >0
Declared by:
services.unbeholden-lnurl.settings.addresses.<name>.min_sendable
Minimum amount in millisatoshis.
Type: positive integer, meaning >0
Declared by:
services.unbeholden-lnurl.settings.nostr
Nostr zap receipts. Set to {} to enable them.
Type: null or (open submodule of (YAML 1.1 value))
Default:
null
Declared by:
services.unbeholden-lnurl.settings.nostr.private_key_file
File with the Nostr private key.
Type: string
Default:
"\${config.nix-bitcoin.secretsDir}/unbeholden-lnurl-nostr"
Declared by:
services.unbeholden-lnurl.settings.notifications.ntfy
ntfy settlement notifications. Set token_file instead of token, so that
the token stays out of the Nix store.
Type: null or (attribute set of (YAML 1.1 value))
Default:
null
Declared by:
services.unbeholden-lnurl.settings.outbound_proxy
SOCKS5 proxy for ntfy notifications and Nostr publishing.
Type: null or string
Default:
null
Declared by:
services.unbeholden-lnurl.settings.trusted_proxies
IP addresses or CIDRs of reverse proxies whose X-Forwarded-* headers are trusted.
Type: list of string
Default:
[ ]
Declared by:
services.unbeholden-lnurl.settings.verify_key_file
File with the key for verify URLs. Changing it invalidates old verify URLs.
Type: string
Default:
"\${config.nix-bitcoin.secretsDir}/unbeholden-lnurl-verify"
Declared by:
services.unbeholden-lnurl.settings.withdraw
Withdrawal vouchers.
Type: list of attribute set of (YAML 1.1 value)
Default:
[ ]
Declared by:
services.unbeholden-lnurl.settings.withdraw_secret_file
File with the voucher secret. Changing it changes every voucher URL.
Type: null or string
Default:
"\${config.nix-bitcoin.secretsDir}/unbeholden-lnurl-withdraw, or null if `withdraw_secret` is set"
Declared by:
services.unbeholden-lnurl.tor.enforce
Whether to enforce Tor on this service by only allowing connections
from and to localhost and, with netns-isolation, the network namespace
addresses 169.254.<addressblock>.0/24. The service also can’t reach
the local name-resolution sockets (nscd, systemd-resolved, D-Bus,
Avahi), so glibc resolves names itself: from /etc/hosts, and through
a resolver only if one listens on an allowed address.
Type: boolean
Default:
false
Declared by:
services.unbeholden-lnurl.tor.proxy
Whether to proxy outgoing connections with Tor.
Type: boolean
Default:
false
Declared by:
services.unbeholden-lnurl.user
The user as which to run Unbeholden LNURL.
Type: string
Default:
"unbeholden-lnurl"
Declared by:
services.unbeholden-wallet.enable
Enable Unbeholden Wallet, a watch-only Bitcoin wallet that runs in the browser and hands transactions to an air-gapped signer.
The service serves the wallet and relays its WebSocket connection at
/electrum to the Electrum server set by
services.unbeholden-wallet.electrumServer.
Browsers only allow the camera, which scans signed transactions,
on localhost or over https. For access from other devices, put an https
reverse proxy in front of the service.
Type: boolean
Default:
false
Declared by:
services.unbeholden-wallet.package
The package providing the wallet and its server.
Type: package
Default:
"config.nix-bitcoin.pkgs.unbeholden-wallet"
Declared by:
services.unbeholden-wallet.address
HTTP server address.
Type: string
Default:
"127.0.0.1"
Declared by:
services.unbeholden-wallet.allowedClients
IP addresses or networks, in addition to localhost, that can connect to the service,
e.g. an https reverse proxy on another host. Set services.unbeholden-wallet.address
to a non-local address too.
systemd ignores entries it can’t parse.
The service can also open connections to these addresses.
This doesn’t open the firewall port.
Not supported with netns-isolation.
Type: list of string
Default:
[ ]
Example:
[
"192.0.2.10"
"192.0.2.0/24"
]
Declared by:
services.unbeholden-wallet.allowedHosts
Names under which the server answers, in addition to localhost and IP addresses.
Give host names without a port: wallet.example.com:8443 never matches.
Add the name of an https reverse proxy in front of the service.
Other names are refused, so a website can’t reach the Electrum relay through DNS rebinding.
Type: list of string
Default:
[ ]
Example:
[
"wallet.example.com"
]
Declared by:
services.unbeholden-wallet.electrumServer
The Electrum server that the wallet connects to.
Possible options:
- electrs: Small database size, slow when querying new addresses.
- fulcrum: Large database size, quickly serves arbitrary address queries.
Type: one of “electrs”, “fulcrum”
Default:
"electrs"
Declared by:
services.unbeholden-wallet.group
The group as which to run Unbeholden Wallet.
Type: string
Default:
"unbeholden-wallet"
Declared by:
services.unbeholden-wallet.port
HTTP server port.
Type: 16 bit unsigned integer; between 0 and 65535 (both inclusive)
Default:
60846
Declared by:
services.unbeholden-wallet.user
The user as which to run Unbeholden Wallet.
Type: string
Default:
"unbeholden-wallet"
Declared by: