What Gets Built

When processing a commit, NixCI discovers which flake outputs exist and creates a build job for each. This page explains which outputs get built.

For an overview of how NixCI processes commits, see How It Works .

Flake Output Types

NixCI builds the following flake outputs, in this order:

  1. devShell
  2. devShells
  3. formatter
  4. packages
  5. checks

You can control which systems and outputs get excluded in your NixCI configuration .

Example

Given a flake with these outputs for x86_64-linux :

{
  devShell.x86_64-linux = ...;
  devShells.x86_64-linux.default = ...;
  formatter.x86_64-linux = ...;
  packages.x86_64-linux.default = ...;
  packages.x86_64-linux.my-app = ...;
  checks.x86_64-linux.lint = ...;
  checks.x86_64-linux.tests = ...;
}

NixCI will create these build runs:

  1. devShell.x86_64-linux
  2. devShells.x86_64-linux.default
  3. formatter.x86_64-linux
  4. packages.x86_64-linux.default
  5. packages.x86_64-linux.my-app
  6. checks.x86_64-linux.lint
  7. checks.x86_64-linux.tests

NixOS Configurations

NixCI does not build nixosConfigurations directly because the architecture cannot be determined automatically. To build a NixOS configuration, expose it as a check:

checks.x86_64-linux.my-machine =
  nixosConfigurations.my-machine.config.system.build.toplevel;

Test and Deploy Jobs

In addition to build jobs, NixCI can run impure tests and continuous deployment jobs. These are configured separately and run after builds complete.