File tree Expand file tree Collapse file tree 4 files changed +44
-16
lines changed Expand file tree Collapse file tree 4 files changed +44
-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 @@ -3,6 +3,10 @@ name: "Update Nix Flake lockfile"
33on :
44 # Allow this workflow to be reused by other workflows:
55 workflow_call :
6+ secrets :
7+ nix-github-token :
8+ description : GitHub token to add as access-token in nix.conf
9+ required : false
610
711 # Allow this workflow to be triggered manually:
812 workflow_dispatch :
2125 - name : Install Nix
2226 uses : cachix/install-nix-action@v27
2327 if : ${{ runner.environment == 'github-hosted' }}
24- with :
25- extra_nix_config : accept-flake-config = true
28+
29+ - name : Configure Nix
30+ shell : bash
31+ run : |
32+ mkdir -p $HOME/.config/nix
33+ {
34+ echo "${{ secrets.nix-github-token != '' && format('access-tokens = github.com={0}', secrets.nix-github-token) || '' }}
35+ accept-flake-config = true"
36+ } > $HOME/.config/nix/nix.conf
37+
2638
2739 - name : Run `nix flake update`
2840 id : update-lockfile
Original file line number Diff line number Diff line change @@ -3,6 +3,10 @@ name: "Update Flake Packages ❄️"
33on :
44 # Allow this workflow to be reused by other workflows:
55 workflow_call :
6+ secrets :
7+ nix-github-token :
8+ description : GitHub token to add as access-token in nix.conf
9+ required : false
610
711 # Allow this workflow to be triggered manually:
812 workflow_dispatch :
@@ -21,10 +25,16 @@ jobs:
2125 - name : Install Nix
2226 uses : cachix/install-nix-action@v27
2327 if : ${{ runner.environment == 'github-hosted' }}
24- with :
25- extra_nix_config : |
28+
29+ - name : Configure Nix
30+ shell : bash
31+ run : |
32+ mkdir -p $HOME/.config/nix
33+ {
34+ echo "${{ secrets.nix-github-token != '' && format('access-tokens = github.com={0}', secrets.nix-github-token) || '' }}
2635 accept-flake-config = true
27- allow-import-from-derivation = true
36+ allow-import-from-derivation = true"
37+ } > $HOME/.config/nix/nix.conf
2838
29393040 id : generate-token
You can’t perform that action at this time.
0 commit comments