Advanced configuration¶
This guide describes advanced configuration methods.
Environment variables and .env files¶
Some CLI options, such as --layout, can be configured via environment variables.
This will be indicated in the usage message when running nipoppy <SUBCOMMAND> --help.
It is also possible to set these options using .env environment files.
Nipoppy searches the following locations (in order of decreasing priority):
<NIPOPPY_PROJECT_ROOT>/.env: project-level~/.nipoppy/.env: user-level
The overall order for determining the value of options is as follows (highest to lowest priority):
Command-line options that are explicitly passed when calling the command
Environment variables that are already defined at runtime
Environment variables loaded from
.envfile(s) (see above)CLI default values
Overriding the global configuration file¶
The default configuration file created by nipoppy init can be overridden by creating a user-level configuration file at ~/.nipoppy/config.json. This can enable the setting of certain machine- or user-specific fields, such as the container command. It can also allow the pre-definition of variables for common pipelines.
The --default-config CLI flag can be used to ignore the user-level file and force the use of the original default global configuration file.