GitHub Action
The Nixomatic GitHub Action provides reproducible CI/CD environments powered by Nix. It helps you:
- Automatically install Nix in your GitHub runners (if needed)
- Set up development environments with exactly the packages you need
- Pin specific package versions for truly reproducible builds
- Run scripts inside a fully configured Nix environment
Quick Start
Add the following step to your .github/workflows/your-workflow.yml:
- uses: curriedsoftware/nixomatic-action@main
with:
packages: python3 nodejs jq
run: |
python --version
node --version
jq --version
Package Formats
You have flexibility in how you specify packages:
| Format | Example | Description |
|---|---|---|
| Basic | jq | Latest version from nixos-unstable |
| Versioned | [email protected] | Specific version (resolved via nxv) |
| Pinned | python3:3b93cf5 | Exact nixpkgs commit for full reproducibility |
Configuration Options
| Input | Required | Default | Description |
|---|---|---|---|
packages | Yes | - | Space-separated list of packages to install |
install-nix | No | true | Whether to install Nix (skip if already available) |
run | No | - | Script to execute in the Nix environment |
Example
A complete workflow that tests a Python project with pinned Python and Node.js versions:
name: CI
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: curriedsoftware/nixomatic-action@main
with:
packages: [email protected] [email protected] jq
run: |
pip install -r requirements.txt
python -m pytest
npm test
For more details, see the Nixomatic Action on GitHub Marketplace.