Skip to main content

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:

FormatExampleDescription
BasicjqLatest version from nixos-unstable
Versioned[email protected]Specific version (resolved via nxv)
Pinnedpython3:3b93cf5Exact nixpkgs commit for full reproducibility

Configuration Options

InputRequiredDefaultDescription
packagesYes-Space-separated list of packages to install
install-nixNotrueWhether to install Nix (skip if already available)
runNo-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.