File tree Expand file tree Collapse file tree 3 files changed +16
-17
lines changed Expand file tree Collapse file tree 3 files changed +16
-17
lines changed Original file line number Diff line number Diff line change @@ -32,14 +32,15 @@ runs:
3232 shell : bash
3333 run : |
3434 mkdir -p $HOME/.config/nix
35- {
36- echo "machine ${{inputs.cachix-cache}}.cachix.org password ${{inputs.cachix-auth-token}}"
37- } >> $HOME/.config/nix/netrc
38- {
39- echo "${{ inputs.nix-github-token != '' && format('access-tokens = github.com={0}', inputs.nix-github-token) || '' }}
40- accept-flake-config = true
35+
36+ cat << EOF > "$HOME/.config/nix/nix.conf"
37+ ${{ inputs.nix-github-token != '' && format('access-tokens = github.com={0}', inputs.nix-github-token) || '' }}
4138 allow-import-from-derivation = true
4239 substituters = https://cache.nixos.org ${{inputs.substituters}}
4340 trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= ${{inputs.trusted-public-keys}}
4441 netrc-file = $HOME/.config/nix/netrc"
45- } > $HOME/.config/nix/nix.conf
42+ EOF
43+
44+ cat << EOF > "$HOME/.config/nix/netrc"
45+ machine ${{inputs.cachix-cache}}.cachix.org password ${{inputs.cachix-auth-token}}
46+ EOF
Original file line number Diff line number Diff line change @@ -36,11 +36,10 @@ jobs:
3636 shell : bash
3737 run : |
3838 mkdir -p $HOME/.config/nix
39- {
40- echo "${{ secrets.NIX_GITHUB_TOKEN != '' && format('access-tokens = github.com={0}', secrets.NIX_GITHUB_TOKEN) || '' }}
41- accept-flake-config = true"
42- } > $HOME/.config/nix/nix.conf
43-
39+ cat << EOF > "$HOME/.config/nix/nix.conf"
40+ ${{ secrets.NIX_GITHUB_TOKEN != '' && format('access-tokens = github.com={0}', secrets.NIX_GITHUB_TOKEN) || '' }}
41+ allow-import-from-derivation = true
42+ EOF
4443
4544 - name : Run `nix flake update`
4645 id : update-lockfile
Original file line number Diff line number Diff line change @@ -36,11 +36,10 @@ jobs:
3636 shell : bash
3737 run : |
3838 mkdir -p $HOME/.config/nix
39- {
40- echo "${{ secrets.NIX_GITHUB_TOKEN != '' && format('access-tokens = github.com={0}', secrets.NIX_GITHUB_TOKEN) || '' }}
41- accept-flake-config = true
42- allow-import-from-derivation = true"
43- } > $HOME/.config/nix/nix.conf
39+ cat << EOF > "$HOME/.config/nix/nix.conf"
40+ ${{ secrets.NIX_GITHUB_TOKEN != '' && format('access-tokens = github.com={0}', secrets.NIX_GITHUB_TOKEN) || '' }}
41+ allow-import-from-derivation = true
42+ EOF
4443
45444645 id : generate-token
You can’t perform that action at this time.
0 commit comments