mirror of
https://github.com/cachix/install-nix-action.git
synced 2025-11-07 16:09:13 +00:00
Compare commits
No commits in common. "master" and "v31.7.0" have entirely different histories.
4 changed files with 9 additions and 15 deletions
3
.github/workflows/test-per-system.yml
vendored
3
.github/workflows/test-per-system.yml
vendored
|
|
@ -13,8 +13,7 @@ on:
|
||||||
type: string
|
type: string
|
||||||
oldest_installer_version:
|
oldest_installer_version:
|
||||||
description: 'Oldest supported Nix installer version to test (e.g., nix-2.8.0)'
|
description: 'Oldest supported Nix installer version to test (e.g., nix-2.8.0)'
|
||||||
required: false
|
required: true
|
||||||
default: 'nix-2.8.0'
|
|
||||||
type: string
|
type: string
|
||||||
|
|
||||||
env:
|
env:
|
||||||
|
|
|
||||||
7
.github/workflows/test.yml
vendored
7
.github/workflows/test.yml
vendored
|
|
@ -42,10 +42,6 @@ jobs:
|
||||||
- runs-on: macos-14
|
- runs-on: macos-14
|
||||||
system: aarch64-darwin
|
system: aarch64-darwin
|
||||||
oldest_installer_version: nix-2.8.0
|
oldest_installer_version: nix-2.8.0
|
||||||
- runs-on: macos-15-intel
|
|
||||||
system: x86_64-darwin
|
|
||||||
oldest_installer_version: nix-2.18.6
|
|
||||||
# macos13 will be retired on 04/12/2025
|
|
||||||
- runs-on: macos-13
|
- runs-on: macos-13
|
||||||
system: x86_64-darwin
|
system: x86_64-darwin
|
||||||
oldest_installer_version: nix-2.8.0
|
oldest_installer_version: nix-2.8.0
|
||||||
|
|
@ -65,5 +61,4 @@ jobs:
|
||||||
./bin/act push \
|
./bin/act push \
|
||||||
-P ubuntu-latest=ghcr.io/catthehacker/ubuntu:js-24.04 \
|
-P ubuntu-latest=ghcr.io/catthehacker/ubuntu:js-24.04 \
|
||||||
-j simple-build \
|
-j simple-build \
|
||||||
--matrix runs-on:ubuntu-latest \
|
--matrix os:ubuntu-latest
|
||||||
--matrix system:x86_64-linux
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
# install-nix-action
|
# install-nix-action
|
||||||
|
|
||||||
[](https://github.com/cachix/install-nix-action/actions/workflows/test.yml)
|

|
||||||
|
|
||||||
Installs [Nix](https://nixos.org/nix/) on GitHub Actions runners for Linux and macOS.
|
Installs [Nix](https://nixos.org/nix/) on GitHub Actions runners for Linux and macOS.
|
||||||
|
|
||||||
|
|
@ -58,7 +58,7 @@ jobs:
|
||||||
|
|
||||||
| Name | Description | Default |
|
| Name | Description | Default |
|
||||||
|------|-------------|---------|
|
|------|-------------|---------|
|
||||||
| `install_url` | URL to install Nix from. Useful for testing non-stable releases or pinning a specific Nix version (e.g., <https://releases.nixos.org/nix/nix-2.3.7/install>) | `""` |
|
| `install_url` | URL to install Nix from. Useful for testing non-stable releases or pinning a specific Nix version (e.g., https://releases.nixos.org/nix/nix-2.3.7/install) | `""` |
|
||||||
| `install_options` | Additional flags to pass to the Nix installer script | `""` |
|
| `install_options` | Additional flags to pass to the Nix installer script | `""` |
|
||||||
| `extra_nix_config` | Additional configuration to append to `/etc/nix/nix.conf` | `""` |
|
| `extra_nix_config` | Additional configuration to append to `/etc/nix/nix.conf` | `""` |
|
||||||
| `nix_path` | Value to set for the `NIX_PATH` environment variable (e.g., `nixpkgs=channel:nixos-unstable`) | `""` |
|
| `nix_path` | Value to set for the `NIX_PATH` environment variable (e.g., `nixpkgs=channel:nixos-unstable`) | `""` |
|
||||||
|
|
@ -66,6 +66,7 @@ jobs:
|
||||||
| `set_as_trusted_user` | Add the current user to the `trusted-users` list | `true` |
|
| `set_as_trusted_user` | Add the current user to the `trusted-users` list | `true` |
|
||||||
| `enable_kvm` | Enable KVM for hardware-accelerated virtualization on Linux | `true` |
|
| `enable_kvm` | Enable KVM for hardware-accelerated virtualization on Linux | `true` |
|
||||||
|
|
||||||
|
|
||||||
## Differences from the default Nix installer
|
## Differences from the default Nix installer
|
||||||
|
|
||||||
Some settings have been optimised for use in CI environments:
|
Some settings have been optimised for use in CI environments:
|
||||||
|
|
@ -195,7 +196,6 @@ nix develop --impure
|
||||||
In multi-user mode, Nix commands that operate on the Nix store are forwarded to a privileged daemon. This daemon runs in a separate context from your GitHub Actions workflow and cannot access the workflow's environment variables. Consequently, any secrets or credentials defined in your workflow environment will not be available to Nix operations that require store access.
|
In multi-user mode, Nix commands that operate on the Nix store are forwarded to a privileged daemon. This daemon runs in a separate context from your GitHub Actions workflow and cannot access the workflow's environment variables. Consequently, any secrets or credentials defined in your workflow environment will not be available to Nix operations that require store access.
|
||||||
|
|
||||||
There are two ways to pass AWS credentials to the Nix daemon:
|
There are two ways to pass AWS credentials to the Nix daemon:
|
||||||
|
|
||||||
- Configure a default profile using the AWS CLI
|
- Configure a default profile using the AWS CLI
|
||||||
- Install Nix in single-user mode
|
- Install Nix in single-user mode
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -102,7 +102,7 @@ echo "installer options: ${installer_options[*]}"
|
||||||
|
|
||||||
# There is --retry-on-errors, but only newer curl versions support that
|
# There is --retry-on-errors, but only newer curl versions support that
|
||||||
curl_retries=5
|
curl_retries=5
|
||||||
nix_version=2.32.2
|
nix_version=2.31.2
|
||||||
while ! curl -sS -o "$workdir/install" -v --fail -L "${INPUT_INSTALL_URL:-https://releases.nixos.org/nix/nix-${nix_version}/install}"; do
|
while ! curl -sS -o "$workdir/install" -v --fail -L "${INPUT_INSTALL_URL:-https://releases.nixos.org/nix/nix-${nix_version}/install}"; do
|
||||||
sleep 1
|
sleep 1
|
||||||
((curl_retries--))
|
((curl_retries--))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue