Skip to content

Commit

Permalink
be able to pass installer options
Browse files Browse the repository at this point in the history
  • Loading branch information
domenkozar committed Feb 21, 2021
1 parent 3349b09 commit 0e6d02d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 3 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
5 changes: 4 additions & 1 deletion lib/install-nix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,18 @@ if [[ $INPUT_EXTRA_NIX_CONFIG != "" ]]; then
add_config "$INPUT_EXTRA_NIX_CONFIG"
fi


# Nix installer flags
installer_options=(
default_installer_options=(
--daemon
--daemon-user-count 4
--no-channel-add
--darwin-use-unencrypted-nix-store-volume
--nix-extra-conf-file /tmp/nix.conf
)
installer_options=("${default_installer_options[@]}" "${INPUT_INSTALL_OPTIONS[@]}")

echo "installer options: ${installer_options[@]}"
# On self-hosted runners we don't need to install more than once
if [[ ! -d /nix/store ]]
then
Expand Down

0 comments on commit 0e6d02d

Please sign in to comment.