Skip to content

Commit

Permalink
don't insist $USER needs to be set
Browse files Browse the repository at this point in the history
  • Loading branch information
domenkozar committed Mar 1, 2023
1 parent 3755e30 commit 167742c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 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 [[ $INPUT_GITHUB_ACCESS_TOKEN != "" ]]; then
add_config "access-tokens" "github.com=$INPUT_GITHUB_ACCESS_TOKEN"
Expand Down Expand Up @@ -86,7 +86,6 @@ 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"

Expand Down

0 comments on commit 167742c

Please sign in to comment.