From 2e56a105a647ab272a41eefbae500e501125ddb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Domen=20Ko=C5=BEar?= Date: Sat, 20 Feb 2021 21:46:57 +0000 Subject: [PATCH] be able to pass installer options --- action.yml | 4 +++- lib/install-nix.sh | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 9c3b0b0..5ef04a0 100644 --- a/action.yml +++ b/action.yml @@ -3,7 +3,9 @@ description: 'Installs Nix on GitHub Actions for the supported platforms: Linux author: 'Domen Kožar' inputs: install_url: - description: 'Installation URL that will contain a script to install Nix' + description: 'Installation URL that will contain a script to install Nix.' + install_options: + description: 'Additional installer flags passed to the installer script.' nix_path: description: 'Set NIX_PATH environment variable.' extra_nix_config: diff --git a/lib/install-nix.sh b/lib/install-nix.sh index cc69997..e701d69 100755 --- a/lib/install-nix.sh +++ b/lib/install-nix.sh @@ -27,7 +27,11 @@ installer_options=( --darwin-use-unencrypted-nix-store-volume --nix-extra-conf-file /tmp/nix.conf ) +if [[ $INPUT_INSTALL_OPTIONS != "" ]]; then + installer_options=("${installer_options[@]}" "${INPUT_INSTALL_OPTIONS[@]}") +fi +echo "installer options: ${installer_options[@]}" # On self-hosted runners we don't need to install more than once if [[ ! -d /nix/store ]] then