Important
This action is experimental and is currently undergoing testing.
A GitHub Action to install Nix using the NixOS nix-installer.
Basic usage:
- uses: NixOS/nix-installer-action@mainWith custom configuration:
- uses: NixOS/nix-installer-action@main
with:
extra-conf: |
experimental-features = nix-command flakesInstall specific version:
- uses: NixOS/nix-installer-action@main
with:
installer-version: v3.11.3Container 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| Input | Description | Default |
|---|---|---|
installer-version |
Installer version to use from releases | latest |
extra-conf |
Extra configuration lines to append to /etc/nix/nix.conf |
|
logger |
Logger format: compact, full, pretty, json |
compact |
verbosity |
Verbosity level: 0 (info), 1 (debug), 2 (trace) |
0 |
add-channel |
Setup the default system channels | false |
init |
Init system: auto (detect container), yes (use systemd/launchd), no (manual daemon) |
auto |
trust-runner-user |
Add the current user to trusted-users in nix.conf |
true |
| Platform | Architecture |
|---|---|
| Linux | x86_64, aarch64, armv7l |
| macOS | x86_64, aarch64 |
This project is licensed under the LGPL-2.1 License - see the LICENSE file for details.