determinate-nix-action/tools/README.template.md
2025-05-16 12:39:52 -04:00

5.4 KiB
Raw Permalink Blame History

 Discord   Bluesky   Mastodon   Twitter   LinkedIn 

❄️ Determinate Nix Action

Determinate is the best way to use Nix on macOS, WSL, and Linux. It is an end-to-end toolchain for using Nix, from installation to collaboration to deployment.

Based on the Determinate Nix Installer and its corresponding Nix Installer Action, responsible for over tens of thousands of Nix installs daily.

Note

Why a different Action?

We created a new Action to synchronize version tags to Determinate Nix releases. GitHub Actions are tagged with the specific version, like v3.5.2, with a moving v3 tag for the major version. We needed a fresh tag namespace since nix-installer-action already has a v3 tag.

🫶 Platform support

  • Accelerated KVM on open source projects and larger runners. See GitHub's announcement for more info.
  • 🐧 Linux, x86_64, aarch64, and i686
  • 🍏 macOS, x86_64 and aarch64
  • 🪟 WSL2, x86_64 and aarch64
  • 🐋 Containers, ARC, and Act
  • 🐙 GitHub Enterprise Server
  • 💁 GitHub Hosted, self-hosted, and long running Actions Runners

🔧 Usage

Here's an example Actions workflow configuration that uses determinate-nix-action:

on:
  pull_request:
  push:
    branches: [main]

jobs:
  build-pkg:
    name: Build Nix package
    runs-on: ubuntu-latest
    permissions:
      id-token: write
      contents: read
    steps:
      - uses: actions/checkout@<!-- checkout_action_tag -->
      - uses: DeterminateSystems/determinate-nix-action@main # or <!-- version --> to pin to a release
      - run: nix build .

Important

If you use FlakeHub, you need to add a permissions block like the one in the example above or else Determinate Nix can't authenticate with FlakeHub or FlakeHub Cache.

📌 Version pinning: lock it down!

Why pin your Action?

Unlike DeterminateSystems/nix-installer-action, we fully support explicit version pinning for maximum consistency. This Action is automatically tagged for every Determinate Nix release, giving you complete control over your CI environment:

📍 Pinning to DeterminateSystems/determinate-nix-action@<!-- version --> guarantees:

  • Same nix-installer-action revision every time
  • Consistent Determinate Nix installation
  • Reproducible CI workflows, even years later

Using @main instead? You'll:

  • Always get the latest Determinate Nix release
  • Occasionally participate in phased rollouts (helping us test new releases!)

Important

Set up Dependabot to stay current with Determinate Nix releases without sacrificing stability.

🤖 Automate updates with Dependabot

Keep your GitHub Actions fresh without manual work! Create .github/dependabot.yml with:

version: 2
updates:
  - package-ecosystem: github-actions
    directory: /
    schedule:
      interval: weekly

⚙️ Configuration

🛟 Need help? We're here for you!

We're committed to making your experience with Determinate Nix as smooth as possible. If you encounter any issues or have questions, here's how to reach us:

🤝 Looking for enterprise support? We offer dedicated support contracts and shared Slack channels for organizations requiring priority assistance. Contact us to learn more.