From afb82faed7ccd59b1224045ea010cf2c2aece4f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Domen=20Ko=C5=BEar?= Date: Thu, 14 May 2020 13:21:40 +0200 Subject: [PATCH] Allow overriding installation URL --- action.yml | 3 +++ lib/install-nix.sh | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 76c78eab..d54e0338 100644 --- a/action.yml +++ b/action.yml @@ -1,6 +1,9 @@ name: 'Install Nix' description: 'Installs Nix on GitHub Actions for the supported platforms: Linux and macOS.' author: 'Domen Kožar' +inputs: + install_url: + description: 'Installation URL that will contain a script to install Nix' branding: color: 'blue' icon: 'sun' diff --git a/lib/install-nix.sh b/lib/install-nix.sh index cc3ef555..7bd47c2f 100755 --- a/lib/install-nix.sh +++ b/lib/install-nix.sh @@ -26,7 +26,7 @@ nixConf # Needed due to multi-user being too defensive export ALLOW_PREEXISTING_INSTALLATION=1 -sh <(curl -L https://nixos.org/nix/install) --daemon +sh <(curl -L ${INPUT_INSTALL_URL:-https://nixos.org/nix/install}) --daemon # write nix.conf again as installation overwrites it nixConf