Skip to content

Commit

Permalink
Merge pull request #163 from cachix/fix-nix-2.14
Browse files Browse the repository at this point in the history
Support new Nix 2.14 profile PATH
  • Loading branch information
domenkozar authored Mar 1, 2023
2 parents 193b0d8 + 167742c commit 29bd929
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions install-nix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ add_config() {
# Set jobs to number of cores
add_config "max-jobs = auto"
# Allow binary caches for user
add_config "trusted-users = root $USER"
add_config "trusted-users = root ${USER:-}"
# Add github access token
if [[ -n "${INPUT_GITHUB_ACCESS_TOKEN:-}" ]]; then
add_config "access-tokens = github.com=$INPUT_GITHUB_ACCESS_TOKEN"
Expand Down Expand Up @@ -88,7 +88,8 @@ fi

# Set paths
echo "/nix/var/nix/profiles/default/bin" >> "$GITHUB_PATH"
echo "/nix/var/nix/profiles/per-user/$USER/profile/bin" >> "$GITHUB_PATH"
# new path for nix 2.14
echo "$HOME/.nix-profile/bin" >> "$GITHUB_PATH"

if [[ $INPUT_NIX_PATH != "" ]]; then
echo "NIX_PATH=${INPUT_NIX_PATH}" >> "$GITHUB_ENV"
Expand Down

0 comments on commit 29bd929

Please sign in to comment.