_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
: ThespecialArgs
argument passed toevalModules
. -
All attributes of
specialArgs
Whereas 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
specialArgs
which are available during import resolution.For NixOS,
specialArgs
includesmodulesPath
, which allows you to import extra modules from the nixpkgs package tree without having to somehow make the module aware of the location of thenixpkgs
or 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.pkgs
option.
Type: lazy attribute set of raw value
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.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.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
. Logs are rotated daily and compressed.
Type: boolean
Default: true
Declared by:
infra.nodes.+<+name>.bitcoind.detailedLogging.logsToKeep
Logs to keep on the server before deleting them (maps to logrotates ‘rotate’ setting). Logs are rotated daily, so keeping two logs means keeping two days worth of logs.
Type: 16 bit unsigned integer; between 0 and 65535 (both inclusive)
Default: 4
Example: 2
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.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>.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>.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: