File tree Expand file tree Collapse file tree 4 files changed +47
-16
lines changed Expand file tree Collapse file tree 4 files changed +47
-16
lines changed Original file line number Diff line number Diff line change @@ -27,20 +27,19 @@ runs:
2727 - name : Install Nix
2828 uses : cachix/install-nix-action@v27
2929 if : ${{ runner.environment == 'github-hosted' }}
30- with :
31- extra_nix_config : |
32- ${{ inputs.nix-github-token != '' && format('access-tokens = github.com={0}', inputs.nix-github-token) || '' }}
33- accept-flake-config = true
34- allow-import-from-derivation = true
35- substituters = https://cache.nixos.org ${{inputs.substituters}}
36- trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= ${{inputs.trusted-public-keys}}
37- netrc-file = $HOME/.config/nix/netrc
3830
3931 - name : Configure Nix
40- if : ${{ runner.environment == 'github-hosted' }}
4132 shell : bash
4233 run : |
4334 mkdir -p $HOME/.config/nix
4435 {
4536 echo "machine ${{inputs.cachix-cache}}.cachix.org password ${{inputs.cachix-auth-token}}"
4637 } >> $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
41+ allow-import-from-derivation = true
42+ substituters = https://cache.nixos.org ${{inputs.substituters}}
43+ trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= ${{inputs.trusted-public-keys}}
44+ netrc-file = $HOME/.config/nix/netrc"
45+ } > $HOME/.config/nix/nix.conf
Original file line number Diff line number Diff line change @@ -182,8 +182,15 @@ jobs:
182182
183183 - name : Install Nix
184184 uses : cachix/install-nix-action@V27
185- with :
186- extra_nix_config : accept-flake-config = true
185+
186+ - name : Configure Nix
187+ shell : bash
188+ run : |
189+ mkdir -p $HOME/.config/nix
190+ {
191+ echo "${{ inputs.nix-github-token != '' && format('access-tokens = github.com={0}', inputs.nix-github-token) || '' }}
192+ accept-flake-config = true"
193+ } > $HOME/.config/nix/nix.conf
187194
188195 - uses : cachix/cachix-action@v15
189196 with :
Original file line number Diff line number Diff line change 1111 schedule :
1212 - cron : 0 0 * * 0 # https://crontab.guru/#0_0_*_*_0
1313
14+ inputs :
15+ nix-github-token :
16+ description : GitHub token to add as access-token in nix.conf
17+ default : ' '
18+ required : false
19+
1420jobs :
1521 main :
1622 runs-on : ubuntu-latest
2127 - name : Install Nix
2228 uses : cachix/install-nix-action@v27
2329 if : ${{ runner.environment == 'github-hosted' }}
24- with :
25- extra_nix_config : accept-flake-config = true
30+
31+ - name : Configure Nix
32+ shell : bash
33+ run : |
34+ mkdir -p $HOME/.config/nix
35+ {
36+ echo "${{ inputs.nix-github-token != '' && format('access-tokens = github.com={0}', inputs.nix-github-token) || '' }}
37+ accept-flake-config = true"
38+ } > $HOME/.config/nix/nix.conf
2639
2740 - name : Run `nix flake update`
2841 id : update-lockfile
Original file line number Diff line number Diff line change 1111 schedule :
1212 - cron : " 0 0 * * *" # https://crontab.guru/#0_0_*_*_*
1313
14+ inputs :
15+ nix-github-token :
16+ description : GitHub token to add as access-token in nix.conf
17+ default : ' '
18+ required : false
19+
1420jobs :
1521 updateFlakePackages :
1622 runs-on : ubuntu-latest
@@ -21,10 +27,16 @@ jobs:
2127 - name : Install Nix
2228 uses : cachix/install-nix-action@v27
2329 if : ${{ runner.environment == 'github-hosted' }}
24- with :
25- extra_nix_config : |
30+
31+ - name : Configure Nix
32+ shell : bash
33+ run : |
34+ mkdir -p $HOME/.config/nix
35+ {
36+ echo "${{ inputs.nix-github-token != '' && format('access-tokens = github.com={0}', inputs.nix-github-token) || '' }}
2637 accept-flake-config = true
27- allow-import-from-derivation = true
38+ allow-import-from-derivation = true"
39+ } > $HOME/.config/nix/nix.conf
2840
29413042 id : generate-token
You can’t perform that action at this time.
0 commit comments