Skip to content
wavelensPublic

About

nix-based continuous integration system

Topics

Resources

Code of conduct

Contributing

Security policy

Accessibility

Stars

227 stars

Watchers

2 watching

Forks

Gradient

Nix-CI for Teams. Every flake built once, on any machine, cached for everyone.

πŸš€ Quick Start β€’ πŸ“– Documentation β€’ 🌐 Public Instance β€’ πŸ” Options Search β€’ πŸ’¬ Matrix Chat β€’ Gradient Badge

Gradient

πŸ“Έ Screenshot Gallery

gradient_test_10mb.mp4

Gradient evaluates and builds Nix flakes on a pool of workers, starts builds while the evaluation is still running and serves every result from a built-in binary cache.

Features

Git Host Integration GitHub, Gitea / Forgejo and GitLab: builds on push and pull request. Sends status checks back
Build Before Pushing Uncommitted changes built on the CI workers with gradient build
Built-in Binary Cache Per-project caches with S3 storage, signing and sharing between projects
Scales With Workers Evaluation and builds both run on workers; each added machine adds capacity
MCP Server Failed builds, logs and evaluations, readable by any AI assistant
Pull Deployment Machines fetch and switch to their latest built NixOS configuration on their own
Declarative Setup Users, projects, caches and workers as NixOS options, validated at build time
SSO and Teams OIDC login, SCIM provisioning, roles and invites per project and cache

CLI

Download Gradient CLI: a static Linux binary, no Nix needed. Build uncommitted changes on the CI workers:

# Install Gradient
curl -fLo gradient "https://public.gradient.ci/api/v1/tasks/gradient/main/entry-point-downloads?eval=packages.x86_64-linux.gradient-cli-static&filename=gradient"
chmod +x gradient && sudo mv gradient /usr/local/bin/
# or via Nix: nix run github:wavelens/gradient/latest#gradient-cli-full -- [flags]

gradient login https://gradient.example.com
gradient build .#hello

All commands: CLI Reference.

Compared to Hydra and GitHub Actions

Hydra GitHub Actions + Cachix Gradient
Build start After the whole evaluation finishes After the job has evaluated the flake While the evaluation is still running
Evaluation On the server, limited by one machine Inside each job, limited by the runner On workers, scales with them
Import from derivation (IFD) Not supported Built by the runner inside the job Built on the workers as shared builds, cached and logged like any build
Nix store Kept on the server and builders Empty on every job; each job downloads its closure again Kept on the workers between builds
Shared work One build per derivation Parallel jobs can build the same derivation twice Every derivation built once, shared across projects
Build outputs Pass through the server Pushed from the runner to Cachix Large outputs go from worker straight to S3
Server host Needs a writable Nix store Hosted by GitHub Needs no Nix store, fits in a micro-VM
Heavy builds Static machine list with speed factors Fixed runner sizes Scoring system places them by predicted memory, learned from past builds
Remote building over SSH Only outbound, to its own build machines Not available ssh-ng:// store for nixos-rebuild --build-host and nix copy straight to the CI workers
Private caches One store for the whole instance Free plan: 5 GB, filled quickly by full closures Per-project caches with access control, on own S3 or disk storage
Sign-in Local accounts, LDAP, OIDC with roles for the whole instance GitHub accounts OIDC with provider groups mapped to roles per project, SCIM provisioning
Integrations Minimal JSON API GitHub only REST API, webhooks, Git Integrations and MCP server
Web UI Server-rendered pages GitHub job logs Responsive UI with live log streaming
Stars -

Installation

A NixOS module sets up the server, a local worker, PostgreSQL and the reverse proxy. The Quick Start walks through the setup in three steps.

For a first try on a personal repository, the Standalone instance is running everything in one container or VM:

docker run -dt --name gradient --privileged --cgroupns=host -p 127.0.0.1:8080:80 -v gradient:/var/lib ghcr.io/wavelens/gradient-standalone
# or
nix run github:wavelens/gradient/latest#standalone

Pre-built Gradient packages:

URL:        https://public.gradient.ci/cache/main
Public Key: public.gradient.ci-main:qmxRE+saUvhNa3jqaCMWje+feVU77TjABchZrPGf7A8=

API

A REST API backs the web UI and the CLI: OpenAPI spec, Swagger UI.

Roadmap

Planned releases in the Roadmap. Feedback in GitHub Discussions or on Matrix.

Contributing

Contributions are welcome: see the Contributing Guidelines and the Contributor Docs.

Project

License

AGPL-3.0-only, with license notices following the REUSE guidelines. Developed by Wavelens GmbH.

About

nix-based continuous integration system

Topics

Resources

Code of conduct

Contributing

Security policy

Accessibility

Stars

227 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages