Appendix B. Environment Variables

B.1. Input
B.2. Output

B.1. Input

The following environment variables can be used to tweak CI behaviour and configuration. Some of these may be ignored when config.environment.impure = false.

  • CI_CONFIG points to your CI configuration, if not provided via --arg config.

  • CI_CONFIG_ROOT points to your project root. This is used to resolve relative CI_CONFIG paths when generating cloud service configurations.

  • CI_PLATFORM indicates what environment the tests are currently running under. This should generally only be set when configuring a CI server, but the special impure value can be used to instruct the tests to use nixpkgs from your NIX_PATH environment. This may be useful when testing local changes or to avoid nix store bloat from using pinned channels.

  • TBD: CI_ALLOW_ROOT, CI_CLOSE_STDIN

B.2. Output

Environment variables are also used to relay information about the build environment to the configuration, and can be accessed via builtins.getEnv.

  • CI_ROOT points to the path of the CI channel currently being used for evaluation.

  • TBD: CI_ENV, CI_PATH