Skip to content

Commit 167742c

Browse files
committed
don't insist $USER needs to be set
1 parent 3755e30 commit 167742c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

install-nix.sh

Lines changed: 1 addition & 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 [[ $INPUT_GITHUB_ACCESS_TOKEN != "" ]]; then
2626
add_config "access-tokens" "github.com=$INPUT_GITHUB_ACCESS_TOKEN"
@@ -86,7 +86,6 @@ fi
8686

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

0 commit comments

Comments
 (0)