Skip to content

Commit 29bd929

Browse files
authored
Merge pull request #163 from cachix/fix-nix-2.14
Support new Nix 2.14 profile PATH
2 parents 193b0d8 + 167742c commit 29bd929

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

install-nix.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ add_config() {
2020
# Set jobs to number of cores
2121
add_config "max-jobs = auto"
2222
# Allow binary caches for user
23-
add_config "trusted-users = root $USER"
23+
add_config "trusted-users = root ${USER:-}"
2424
# Add github access token
2525
if [[ -n "${INPUT_GITHUB_ACCESS_TOKEN:-}" ]]; then
2626
add_config "access-tokens = github.com=$INPUT_GITHUB_ACCESS_TOKEN"
@@ -88,7 +88,8 @@ fi
8888

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

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

0 commit comments

Comments
 (0)