Skip to content

Commit

Permalink
feat: add nix_install_url param. (#25)
Browse files Browse the repository at this point in the history
This allows arbitrary versions of `nix` to be used by accepting the
download URL for an installer to be passed in to the underlying
`cachix/install-nix-action`.

It sets the default to v2.15.2 so that if the user doesn't explicitly
specify a version their CI jobs won't "change unexpectedly" ( as they do
with github:cachix/install-nix-action default of
https://nixos.org/nix/install ).
  • Loading branch information
aakropotkin authored Oct 9, 2023
1 parent 35372e2 commit c9b5e33
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,14 @@ inputs:
description: |
Absolute installable URI to `flox` executable.
Takes precedence over `floxpkgs-uri` setting.
nix_install_url:
description: |
URL for the `nix` installer to use.
This allows you to select alternative `nix` versions
from the list at https://releases.nixos.org/nix/.
To use the _latest_ stable release you may set this to
https://nixos.org/nix/install.
default: 'https://releases.nixos.org/nix/nix-2.15.2/install'


runs:
Expand All @@ -50,6 +58,7 @@ runs:
- uses: "cachix/install-nix-action@v22"
if: "inputs.existing_nix != 'true'"
with:
install_url: ${{ inputs.nix_install_url }}
github_access_token: "${{ inputs.github-access-token }}"
extra_nix_config: |
experimental-features = nix-command flakes
Expand Down

0 comments on commit c9b5e33

Please sign in to comment.