feat: add EXTRA_NIX_CONFIG variable
This commit is contained in:
parent
14dae8f6a6
commit
a4df497e8e
4 changed files with 15 additions and 0 deletions
4
.github/actions/setup-nix/action.yml
vendored
4
.github/actions/setup-nix/action.yml
vendored
|
|
@ -7,6 +7,9 @@ inputs:
|
||||||
sandbox:
|
sandbox:
|
||||||
type: string
|
type: string
|
||||||
default: "true"
|
default: "true"
|
||||||
|
extra-nix-config:
|
||||||
|
type: string
|
||||||
|
default: ""
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: composite
|
using: composite
|
||||||
|
|
@ -51,6 +54,7 @@ runs:
|
||||||
build-dir = /nix/build
|
build-dir = /nix/build
|
||||||
sandbox = ${{ inputs.sandbox }}
|
sandbox = ${{ inputs.sandbox }}
|
||||||
system = ${{ inputs.system }}
|
system = ${{ inputs.system }}
|
||||||
|
${{ inputs.extra-nix-config }}
|
||||||
|
|
||||||
- name: create build-dir
|
- name: create build-dir
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
|
||||||
1
.github/workflows/build.yml
vendored
1
.github/workflows/build.yml
vendored
|
|
@ -75,6 +75,7 @@ jobs:
|
||||||
- name: setup nix
|
- name: setup nix
|
||||||
uses: ./.github/actions/setup-nix
|
uses: ./.github/actions/setup-nix
|
||||||
with:
|
with:
|
||||||
|
extra-nix-config: ${{ vars.EXTRA_NIX_CONFIG }}
|
||||||
system: ${{ matrix.system }}
|
system: ${{ matrix.system }}
|
||||||
sandbox: ${{
|
sandbox: ${{
|
||||||
(matrix.system == 'x86_64-darwin' && inputs.x86_64-darwin == 'yes_sandbox_false'
|
(matrix.system == 'x86_64-darwin' && inputs.x86_64-darwin == 'yes_sandbox_false'
|
||||||
|
|
|
||||||
1
.github/workflows/review.yml
vendored
1
.github/workflows/review.yml
vendored
|
|
@ -136,6 +136,7 @@ jobs:
|
||||||
- name: setup nix
|
- name: setup nix
|
||||||
uses: ./.github/actions/setup-nix
|
uses: ./.github/actions/setup-nix
|
||||||
with:
|
with:
|
||||||
|
extra-nix-config: ${{ vars.EXTRA_NIX_CONFIG }}
|
||||||
system: ${{ matrix.system }}
|
system: ${{ matrix.system }}
|
||||||
sandbox: ${{
|
sandbox: ${{
|
||||||
(matrix.system == 'x86_64-darwin' && inputs.x86_64-darwin == 'yes_sandbox_false'
|
(matrix.system == 'x86_64-darwin' && inputs.x86_64-darwin == 'yes_sandbox_false'
|
||||||
|
|
|
||||||
|
|
@ -43,6 +43,15 @@ Follow these steps if you want nixpkgs-review-gha to push new packages to a [Cac
|
||||||
2. [Create a new variable](../../settings/variables/actions/new) with the name `CACHIX_CACHE` and set it to the name of your Cachix cache.
|
2. [Create a new variable](../../settings/variables/actions/new) with the name `CACHIX_CACHE` and set it to the name of your Cachix cache.
|
||||||
3. [Create a new secret](../../settings/secrets/actions/new) with the name `CACHIX_AUTH_TOKEN` and set its value to your auth token. If you are using a self-signed cache, you also need to create a `CACHIX_SIGNING_KEY` secret and set its value to your private signing key.
|
3. [Create a new secret](../../settings/secrets/actions/new) with the name `CACHIX_AUTH_TOKEN` and set its value to your auth token. If you are using a self-signed cache, you also need to create a `CACHIX_SIGNING_KEY` secret and set its value to your private signing key.
|
||||||
|
|
||||||
|
### Extra Nix Config (optional)
|
||||||
|
If you have additional configuration you want to append to `/etc/nix/nix.conf`, you can [create a new variable](../../settings/variables/actions/new) with the name `EXTRA_NIX_CONFIG`.
|
||||||
|
For example, if you want to configure nix to use additional substituters, set its value to the following:
|
||||||
|
|
||||||
|
```
|
||||||
|
extra-substituters = https://nix-community.cachix.org
|
||||||
|
extra-trusted-public-keys = nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
|
||||||
|
```
|
||||||
|
|
||||||
### Shortcuts on nixpkgs PR pages (optional)
|
### Shortcuts on nixpkgs PR pages (optional)
|
||||||
Add [`shortcut.js`](shortcut.js) as a user script in your browser for `https://github.com/` for example using the [User JavaScript and CSS chrome extension](https://chromewebstore.google.com/detail/user-javascript-and-css/nbhcbdghjpllgmfilhnhkllmkecfmpld) or [Violentmonkey](https://violentmonkey.github.io/). Don't forget to update the `repo` constant at the top of the file to point to your fork.
|
Add [`shortcut.js`](shortcut.js) as a user script in your browser for `https://github.com/` for example using the [User JavaScript and CSS chrome extension](https://chromewebstore.google.com/detail/user-javascript-and-css/nbhcbdghjpllgmfilhnhkllmkecfmpld) or [Violentmonkey](https://violentmonkey.github.io/). Don't forget to update the `repo` constant at the top of the file to point to your fork.
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue