_module.args
Additional arguments passed to each module in addition to ones like lib, config, and pkgs, modulesPath.
This option is also available to all submodules. Submodules do not inherit args from their parent module, nor do they provide args to their parent module or sibling submodules. The sole exception to this is the argument name which is provided by parent modules to a submodule and contains the attribute name the submodule is bound to, or a unique generated name if it is not bound to an attribute.
Some arguments are already passed by default, of which the following cannot be changed with this option:
-
lib: The nixpkgs library. -
config: The results of all options after merging the values from all modules together. -
options: The options declared in all modules. -
specialArgs: ThespecialArgsargument passed toevalModules. -
All attributes of
specialArgsWhereas option values can generally depend on other option values thanks to laziness, this does not apply to
imports, which must be computed statically before anything else.For this reason, callers of the module system can provide
specialArgswhich are available during import resolution.For NixOS,
specialArgsincludesmodulesPath, which allows you to import extra modules from the nixpkgs package tree without having to somehow make the module aware of the location of thenixpkgsor NixOS directories.{ modulesPath, ... }: { imports = [ (modulesPath + "/profiles/minimal.nix") ]; }
For NixOS, the default value for this option includes at least this argument:
-
pkgs: The nixpkgs package set according to thenixpkgs.pkgsoption.
Type: lazy attribute set of raw value
Default:
{ }
Declared by:
infra.agenixSecretsDir
Path to the agenix secrets directory.
Type: absolute path
Default:
null
Example:
modules/secrets
Declared by:
infra.global.admin.sshPubKeys
SSH public keys that will be able to login (i.e. authorized_keys).
Type: list of string
Default:
[ ]
Example:
[
"ssh-rsa AAAAB3Nza.."
]
Declared by:
infra.global.admin.username
The username of the admin user. Used for logging in via SSH.
Type: string
Default:
null
Declared by:
infra.global.extraConfig
Configuration applied to all node and webserver systems.
Type: attribute set
Default:
{ }
Example:
{
system = {
stateVersion = "25.11";
};
}
Declared by:
infra.nodes
A set of named nodes.
Type: attribute set of (submodule)
Default:
{ }
Declared by:
infra.nodes.+<+name>.enable
Whether to enable this host is a Bitcoin node.
Type: boolean
Default:
false
Example:
true
Declared by:
infra.nodes.+<+name>.addrman-observer.enable
Whether to enable this node for use in a addrman-observer instance…
Type: boolean
Default:
true
Example:
true
Declared by:
infra.nodes.+<+name>.arch
The architecture of this host
Type: string
Default:
"x86_64-linux"
Example:
"aarch64-linux"
Declared by:
infra.nodes.+<+name>.bitcoind.package
The bitcoind package to run on this node.
Type: package
Default:
<derivation bitcoind>
Declared by:
infra.nodes.+<+name>.bitcoind.addrmanSnapshots.enable
Whether to enable periodic addrman snapshots using getrawaddrman. Snapshots are compressed with zstd and taken as often as onCalendar says…
Type: boolean
Default:
true
Example:
true
Declared by:
infra.nodes.+<+name>.bitcoind.addrmanSnapshots.onCalendar
When to take a snapshot, as a systemd OnCalendar expression (see systemd.time(7)). Daily by default.
Type: string
Default:
"daily"
Example:
"*-*-* 00,06,12,18:00:00"
Declared by:
infra.nodes.+<+name>.bitcoind.addrmanSnapshots.snapshotsToKeep
Number of days of snapshots to keep on the server before deleting them. With the default daily onCalendar, this is the number of snapshots.
Type: 16 bit unsigned integer; between 0 and 65535 (both inclusive)
Default:
30
Example:
7
Declared by:
infra.nodes.+<+name>.bitcoind.banlistScript
A banlist script. Has access to the ‘RPC_BAN_USER’ and ‘RPC_BAN_PW’ env variables
Type: null or string
Default:
null
Declared by:
infra.nodes.+<+name>.bitcoind.chain
The chain / network the node should run.
Type: one of “main”, “test”, “testnet4”, “signet”, “regtest”
Default:
"main"
Declared by:
infra.nodes.+<+name>.bitcoind.customPort
A custom port the Bitcoin node should use for the P2P network. If unset, the default port is used.
Type: null or 16 bit unsigned integer; between 0 and 65535 (both inclusive)
Default:
null
Example:
12345
Declared by:
infra.nodes.+<+name>.bitcoind.dataDir
The data directory of the node. By default, this is /var/lib/bitcoind-*/. Setting this can be useful if there’s a bigger drive mounted somewhere else.
Type: null or string
Default:
null
Declared by:
infra.nodes.+<+name>.bitcoind.detailedLogging.enable
If enabled, turn on potentially spammy debug log categories like net and mempoolrej. The debug.log is rotated hourly and each compressed hourly chunk is accumulated into a per-day gzip archive kept next to debug.log in the bitcoind data dir; a day’s archive is only published to the served/rcloned debug-logs dir once the day is complete (the next day), so half-finished days are never exposed.
Type: boolean
Default:
true
Declared by:
infra.nodes.+<+name>.bitcoind.detailedLogging.logsToKeep
Number of finalized daily debug.log archives to keep on the server before deleting them. The log is rotated hourly and published as one gzip file per completed day, so this is a count of days.
Type: 16 bit unsigned integer; between 0 and 65535 (both inclusive)
Default:
4
Example:
2
Declared by:
infra.nodes.+<+name>.bitcoind.detailedLogging.printToConsole
Whether to enable Wether to print the debug logs to console (i.e. systemd) too. Disabled by default, but can be useful for testing…
Type: boolean
Default:
false
Example:
true
Declared by:
infra.nodes.+<+name>.bitcoind.extraConfig
Extra configuration passed to bitcoind in the ‘bitcoin.conf’ format.
Type: string
Default:
""
Declared by:
infra.nodes.+<+name>.bitcoind.net.useASMap
Whether to enable using a recent ASMap file with this node. See https://asmap.org for more information…
Type: boolean
Default:
false
Example:
true
Declared by:
infra.nodes.+<+name>.bitcoind.net.useCJDNS
Whether to enable CJDNS with this node and accept connections from CJDNS…
Type: boolean
Default:
false
Example:
true
Declared by:
infra.nodes.+<+name>.bitcoind.net.useI2P
Whether to enable i2p with this node and accept connections from i2p…
Type: boolean
Default:
false
Example:
true
Declared by:
infra.nodes.+<+name>.bitcoind.net.useTor
Whether to enable Tor with this node and accept connections from Tor…
Type: boolean
Default:
false
Example:
true
Declared by:
infra.nodes.+<+name>.bitcoind.peerinfoSnapshots.enable
Whether to enable periodic snapshots of the node’s peers using getpeerinfo. Snapshots are compressed with zstd and taken as often as onCalendar says…
Type: boolean
Default:
true
Example:
true
Declared by:
infra.nodes.+<+name>.bitcoind.peerinfoSnapshots.onCalendar
When to take a snapshot, as a systemd OnCalendar expression (see systemd.time(7)). Every six hours by default.
Type: string
Default:
"*-*-* 00,06,12,18:00:00"
Example:
"hourly"
Declared by:
infra.nodes.+<+name>.bitcoind.peerinfoSnapshots.snapshotsToKeep
Number of snapshots to keep on the server before deleting them. A count rather than an age, so that changing onCalendar doesn’t change how much is kept.
Type: 16 bit unsigned integer; between 0 and 65535 (both inclusive)
Default:
120
Example:
28
Declared by:
infra.nodes.+<+name>.bitcoind.peersDatSnapshots.enable
Whether to enable periodic snapshots of the node’s peers.dat file. Snapshots are compressed with zstd and taken as often as onCalendar says…
Type: boolean
Default:
true
Example:
true
Declared by:
infra.nodes.+<+name>.bitcoind.peersDatSnapshots.onCalendar
When to take a snapshot, as a systemd OnCalendar expression (see systemd.time(7)). Daily by default.
Type: string
Default:
"daily"
Example:
"hourly"
Declared by:
infra.nodes.+<+name>.bitcoind.peersDatSnapshots.snapshotsToKeep
Number of snapshots to keep on the server before deleting them. A count rather than an age, so that changing onCalendar doesn’t change how much is kept.
Type: 16 bit unsigned integer; between 0 and 65535 (both inclusive)
Default:
30
Example:
7
Declared by:
infra.nodes.+<+name>.bitcoind.prune
The prune parameter for Bitcoin Core. 0 turns pruning off.
Type: signed integer
Default:
4000
Declared by:
infra.nodes.+<+name>.description
Description of this host. This description might be displayed publicly.
Type: string
Default:
null
Example:
"A peer-observer node / webserver"
Declared by:
infra.nodes.+<+name>.extraConfig
infra.nodes.+<+name>.extraModules
Extra modules that should be included: e.g. hardware-configuration.nix or disko.nix
Type: unspecified value
Default:
[ ]
Example:
[
modules/base/hosts/node1/hardware-configuration.nix
modules/base/hosts/node1/disko.nix
]
Declared by:
infra.nodes.+<+name>.fork-observer.enable
Whether to enable this node for use in a fork-observer instance…
Type: boolean
Default:
true
Example:
true
Declared by:
infra.nodes.+<+name>.id
The id of this host. Must be unique among hosts of the same category (node / webserver).
Type: 8 bit unsigned integer; between 0 and 255 (both inclusive)
Declared by:
infra.nodes.+<+name>.name
The name of this host. Will be used as hostname and elsewhere. This name might be displayed publicly
Type: string
Declared by:
infra.nodes.+<+name>.peer-observer.addrLookup
Whether to enable the peer-observer address-connectivity lookup tool. This reaches out to nodes on the network and might leak IP addresses…
Type: boolean
Default:
false
Example:
true
Declared by:
infra.nodes.+<+name>.peer-observer.extractors.ipc.enable
Whether to enable the peer-observer ipc-extractor.
Type: boolean
Default:
true
Example:
true
Declared by:
infra.nodes.+<+name>.peer-observer.extractors.logs.enable
Whether to enable the peer-observer log-extractor.
Type: boolean
Default:
true
Example:
true
Declared by:
infra.nodes.+<+name>.peer-observer.tools.archiver.addrRelay.enable
Whether to enable an archiver recording address-relay messages (getaddr, addr, addrv2) and P2P connections together with the version messages of their handshake. Writes files suffixed ‘-addr-relay’ .
Type: boolean
Default:
false
Example:
true
Declared by:
infra.nodes.+<+name>.peer-observer.tools.archiver.addrRelay.compressionLevel
Zstd compression level (0 = no compression, 1-22)
Type: integer between 0 and 22 (both inclusive)
Default:
18
Example:
3
Declared by:
infra.nodes.+<+name>.peer-observer.tools.archiver.addrRelay.maxArchiveSize
How many bytes of archives this archiver may keep on the node. Hourly, the oldest archives of this archiver are deleted until the total is back under the budget. The archiver it belongs to writes at its own rate, so each one gets its own budget.
The newest archive is never deleted, as the archiver is still writing to it. Deletion happens in whole files, so the actual usage sits below the budget by up to one file, which is maxFileSize in the peer-observer module.
Type: positive integer, meaning >0
Default:
5368709120
Example:
53687091200
Declared by:
infra.nodes.+<+name>.peer-observer.tools.archiver.baseName
Base name for archive files. The node name and, for the variants below, a variant suffix are appended to it, e.g. ‘mainnet’ -> ‘[node-name]-mainnet.+<+timestamp>.bin.zst’.
Required as soon as one of the archivers below is enabled.
Type: string
Example:
"demo-peer-observer"
Declared by:
infra.nodes.+<+name>.peer-observer.tools.archiver.full.enable
Whether to enable an archiver recording every event.
Type: boolean
Default:
false
Example:
true
Declared by:
infra.nodes.+<+name>.peer-observer.tools.archiver.full.compressionLevel
Zstd compression level (0 = no compression, 1-22)
Type: integer between 0 and 22 (both inclusive)
Default:
18
Example:
3
Declared by:
infra.nodes.+<+name>.peer-observer.tools.archiver.full.maxArchiveSize
How many bytes of archives this archiver may keep on the node. Hourly, the oldest archives of this archiver are deleted until the total is back under the budget. The archiver it belongs to writes at its own rate, so each one gets its own budget.
The newest archive is never deleted, as the archiver is still writing to it. Deletion happens in whole files, so the actual usage sits below the budget by up to one file, which is maxFileSize in the peer-observer module.
Type: positive integer, meaning >0
Default:
5368709120
Example:
53687091200
Declared by:
infra.nodes.+<+name>.peer-observer.tools.archiver.lowData.enable
Whether to enable an archiver recording every event, but without raw transaction data. Transactions keep their txid and wtxid, blocks keep only their header. Writes files suffixed ‘-low-data’ .
Type: boolean
Default:
false
Example:
true
Declared by:
infra.nodes.+<+name>.peer-observer.tools.archiver.lowData.compressionLevel
Zstd compression level (0 = no compression, 1-22)
Type: integer between 0 and 22 (both inclusive)
Default:
18
Example:
3
Declared by:
infra.nodes.+<+name>.peer-observer.tools.archiver.lowData.maxArchiveSize
How many bytes of archives this archiver may keep on the node. Hourly, the oldest archives of this archiver are deleted until the total is back under the budget. The archiver it belongs to writes at its own rate, so each one gets its own budget.
The newest archive is never deleted, as the archiver is still writing to it. Deletion happens in whole files, so the actual usage sits below the budget by up to one file, which is maxFileSize in the peer-observer module.
Type: positive integer, meaning >0
Default:
5368709120
Example:
53687091200
Declared by:
infra.nodes.+<+name>.samply-continuous-profiling
Whether to enable samply continuous CPU profiling of the bitcoind process. Writes one 24h-long, gzipped sample file per run to /data/profiling, restarting on exit. Runs as root to ptrace bitcoind…
Type: boolean
Default:
false
Example:
true
Declared by:
infra.nodes.+<+name>.setup
Whether to enable This host is being setup. This means, the host doesn’t need secrets yet which makes installation of the system with e.g. nixos-anywhere easier…
Type: boolean
Default:
false
Example:
true
Declared by:
infra.nodes.+<+name>.wireguard.ip
The IPv4 address this host should be reachable via wireguard.
Type: string
Default:
null
Example:
"10.0.23.2"
Declared by:
infra.nodes.+<+name>.wireguard.pubkey
The wireguard public key of this host.
Type: string
Default:
null
Example:
"fake/nI5tS3MmxwlWkWr5rtqBhxYfOeqml7Cu8fake="
Declared by:
infra.webservers
A set of named webservers.
Type: attribute set of (submodule)
Default:
{ }
Declared by:
infra.webservers.+<+name>.enable
Whether to enable this host is a web server.
Type: boolean
Default:
false
Example:
true
Declared by:
infra.webservers.+<+name>.access_DANGER
Choose if the LIMITED_ACCESS or FULL_ACCESS peer-observer tools and data should be exposed. FULL_ACCESS is only intended for demo setups and SHOULD NOT be used for production setups. FULL_ACCESS allows finding out the IP addresses of the honeypot nodes.
Type: one of “LIMITED_ACCESS”, “FULL_ACCESS”
Default:
"LIMITED_ACCESS"
Example:
"FULL_ACCESS"
Declared by:
infra.webservers.+<+name>.arch
The architecture of this host
Type: string
Default:
"x86_64-linux"
Example:
"aarch64-linux"
Declared by:
infra.webservers.+<+name>.description
Description of this host. This description might be displayed publicly.
Type: string
Default:
null
Example:
"A peer-observer node / webserver"
Declared by:
infra.webservers.+<+name>.domain
The domain pointing to the IP address of this web host. This needs to be set.
Type: null or string
Default:
null
Example:
"peer-observer.example.com"
Declared by:
infra.webservers.+<+name>.extraConfig
infra.webservers.+<+name>.extraModules
Extra modules that should be included: e.g. hardware-configuration.nix or disko.nix
Type: unspecified value
Default:
[ ]
Example:
[
modules/base/hosts/node1/hardware-configuration.nix
modules/base/hosts/node1/disko.nix
]
Declared by:
infra.webservers.+<+name>.fork-observer.description
Description of the network and nodes.
Type: string
Default:
"fork-observer attached to peer-observer nodes"
Declared by:
infra.webservers.+<+name>.fork-observer.minForkHeight
Height at which fork-observer should start to consider forks. The default works well for mainnet, but will not work for other chains/networks.
Type: signed integer
Default:
500000
Example:
0
Declared by:
infra.webservers.+<+name>.fork-observer.networkName
Name of the chain / network of the peer-observer nodes.
Type: string
Default:
"mainnet"
Declared by:
infra.webservers.+<+name>.fork-observer.poolIdentification.enable
Whether to enable enable pool-identification.
Type: boolean
Default:
true
Example:
true
Declared by:
infra.webservers.+<+name>.fork-observer.poolIdentification.network
Data and network used for pool-identification of the blocks.
Type: string
Default:
"Mainnet"
Declared by:
infra.webservers.+<+name>.grafana.admin_user
The username of the Grafana admin user.
Type: null or string
Default:
null
Declared by:
infra.webservers.+<+name>.id
The id of this host. Must be unique among hosts of the same category (node / webserver).
Type: 8 bit unsigned integer; between 0 and 255 (both inclusive)
Declared by:
infra.webservers.+<+name>.index.fullAccessNotice
A notice to include at the top of the index.html page for FULL_ACCESS. Can contain HTML (styled with bootstrap).
Type: string
Default:
""
Declared by:
infra.webservers.+<+name>.index.limitedAccessNotice
A notice to include at the top of the index.html page for LIMITED_ACCESS. Can contain HTML (styled with bootstrap).
Type: string
Default:
""
Declared by:
infra.webservers.+<+name>.name
The name of this host. Will be used as hostname and elsewhere. This name might be displayed publicly
Type: string
Declared by:
infra.webservers.+<+name>.prometheus.retention
How long the prometheus metrics should be kept.
Type: string
Default:
"30d"
Declared by:
infra.webservers.+<+name>.setup
Whether to enable This host is being setup. This means, the host doesn’t need secrets yet which makes installation of the system with e.g. nixos-anywhere easier…
Type: boolean
Default:
false
Example:
true
Declared by:
infra.webservers.+<+name>.wireguard.ip
The IPv4 address this host should be reachable via wireguard.
Type: string
Default:
null
Example:
"10.0.23.2"
Declared by:
infra.webservers.+<+name>.wireguard.pubkey
The wireguard public key of this host.
Type: string
Default:
null
Example:
"fake/nI5tS3MmxwlWkWr5rtqBhxYfOeqml7Cu8fake="
Declared by: