diff --git a/fix-nix-credentials.sh b/fix-nix-credentials.sh index 7175676..f518fae 100755 --- a/fix-nix-credentials.sh +++ b/fix-nix-credentials.sh @@ -31,9 +31,10 @@ git config --global user.name || git config --global user.name "flox User" # Allows `builtins.fetch{url,Tarball}' and related to work: mkdir -p "$HOME/.config/nix"; -echo "machine api.github.com password $INPUTS_GITHUB_ACCESS_TOKEN" > "$HOME/.config/nix/netrc" -echo "machine pkgs.github.com password $INPUTS_GITHUB_ACCESS_TOKEN" >> "$HOME/.config/nix/netrc" -echo "machine github.com password $INPUTS_GITHUB_ACCESS_TOKEN" >> "$HOME/.config/nix/netrc" +echo "machine api.github.com password $INPUTS_GITHUB_ACCESS_TOKEN" >> "$HOME/.netrc"; +echo "machine pkgs.github.com password $INPUTS_GITHUB_ACCESS_TOKEN" >> "$HOME/.netrc"; +echo "machine github.com password $INPUTS_GITHUB_ACCESS_TOKEN" >> "$HOME/.netrc"; +ln -sr "$HOME/.netrc" "$HOME/.config/nix/netrc"; # Close the log message group which was opened above echo "::endgroup::"