In-repo Configuration

You can configure nix-ci on a per-commit basis by adding a nix-ci section in your flake.nix .

Validator

You can use this validator to validate your configuration without having to push a commit.

To get your configuration as a JSON string, you can run this command in your repository:

nix eval .#nix-ci --json

Reference schema

# SuiteConfiguration
enable: # optional
  # default: true
  # Enable CI
  <boolean>
onlyBuild: # optional
  # Only build these attributes.
  # or null
  - <string>
doNotBuild: # optional
  # default: []
  # Do not build these attributes.
  - <string>
timeout: # optional
  # Maximum timeout, in seconds. Note that the actual timeout may depend on the workers' configuration.
  <number>
cachix: # optional
  # Cachix configuration
  # In order to push to the cache as well, the repository needs to have a CACHIX_AUTH_TOKEN or CACHIX_SIGNING_KEY secret.
  # CachixConfiguration
  name: # required
    # cache name
    <string>
  public-key: # required
    # cache public key (for pulling)
    <string>
impure: # optional
  # Build with --impure
  <boolean>
auto-update: # optional
  # Whether to schedule 'nix flake update' jobs
  # any of
  [ <boolean>
  , # AutoUpdateConfiguration
    enable: # required
      # Enable auto-update jobs
      # or null
      <boolean>
    base: # optional
      # Base branch to base PRs off
      <string>
    user: # optional
      # Github user who's the owner of the access token
      <string>
  ]