mirror of
https://github.com/cachix/install-nix-action.git
synced 2025-06-07 17:44:28 +00:00
Add nix_path action paramter
This commit is contained in:
parent
14f0e86ffb
commit
a744770f4b
4 changed files with 32 additions and 6 deletions
|
@ -6,10 +6,11 @@ sudo sh -c 'echo max-jobs = auto >> /tmp/nix.conf'
|
|||
# Allow binary caches for runner user
|
||||
sudo sh -c 'echo trusted-users = root runner >> /tmp/nix.conf'
|
||||
|
||||
if [[ $INPUT_SKIP_ADDING_NIXPKGS_CHANNEL = "true" ]]; then
|
||||
if [[ $INPUT_SKIP_ADDING_NIXPKGS_CHANNEL = "true" || $INPUT_NIX_PATH != "" ]]; then
|
||||
extra_cmd=--no-channel-add
|
||||
else
|
||||
extra_cmd=
|
||||
INPUT_NIX_PATH="/nix/var/nix/profiles/per-user/root/channels"
|
||||
fi
|
||||
|
||||
sh <(curl -L ${INPUT_INSTALL_URL:-https://nixos.org/nix/install}) \
|
||||
|
@ -29,6 +30,7 @@ fi
|
|||
# Set paths
|
||||
echo "::add-path::/nix/var/nix/profiles/per-user/runner/profile/bin"
|
||||
echo "::add-path::/nix/var/nix/profiles/default/bin"
|
||||
if [[ $INPUT_SKIP_ADDING_NIXPKGS_CHANNEL != "true" ]]; then
|
||||
echo "::set-env name=NIX_PATH::/nix/var/nix/profiles/per-user/root/channels"
|
||||
fi
|
||||
|
||||
if [[ $INPUT_NIX_PATH != "" ]]; then
|
||||
echo "::set-env name=NIX_PATH::${INPUT_NIX_PATH}"
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue