Install Nix GitHub Action

March 2, 2026 ยท View on GitHub

Important

This action is experimental and is currently undergoing testing.

A GitHub Action to install Nix using the NixOS nix-installer.

Usage

Basic usage:

- uses: NixOS/nix-installer-action@main

With custom configuration:

- uses: NixOS/nix-installer-action@main
  with:
    extra-conf: |
      experimental-features = nix-command flakes

Install specific version:

- uses: NixOS/nix-installer-action@main
  with:
    installer-version: 2.33.3

Container environments (e.g., ubuntu-slim):

The action auto-detects the absence of systemd and switches to a manual initialization. You can override this behavior:

- uses: NixOS/nix-installer-action@main
  with:
    init: no  # Explicit: skip init system, start daemon manually

Inputs

InputDescriptionDefault
installer-versionInstaller version to use from releaseslatest
extra-confExtra configuration lines to append to /etc/nix/nix.conf
loggerLogger format: compact, full, pretty, jsoncompact
verbosityVerbosity level: 0 (info), 1 (debug), 2 (trace)0
add-channelSetup the default system channelsfalse
initInit system: auto (detect container), yes (use systemd/launchd), no (manual daemon)auto
trust-runner-userAdd the current user to trusted-users in nix.conftrue

Supported Platforms

PlatformArchitecture
Linuxx86_64, aarch64, armv7l
macOSx86_64, aarch64

License

This project is licensed under the LGPL-2.1 License - see the LICENSE file for details.