From 87d70237f991ebee86692d32989be57b0f2df0fa Mon Sep 17 00:00:00 2001 From: Damien Cassou Date: Tue, 13 Apr 2021 18:47:42 +0200 Subject: [PATCH 1/3] README: Small cleanup --- README.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index a100d61..2e85f52 100644 --- a/README.md +++ b/README.md @@ -78,19 +78,21 @@ To install Nix from any commit, go to [the corresponding installer_test action]( ### How do I print nixpkgs version I have configured? -```nix-instantiate --eval -E '(import {}).lib.version'``` +```yaml +- name: Print nixpkgs version + run: nix-instantiate --eval -E '(import {}).lib.version' +``` ### How can I run NixOS tests? With the following inputs: ```yaml - - uses: cachix/install-nix-action@vXX - with: - extra_nix_config: "system-features = nixos-test benchmark big-parallel kvm" +- uses: cachix/install-nix-action@vXX + with: + extra_nix_config: "system-features = nixos-test benchmark big-parallel kvm" ``` - [Note that there's no hardware acceleration on GitHub Actions.](https://github.com/actions/virtual-environments/issues/183#issuecomment-610723516). ### How can I install packages via nix-env from the specified `nix_path`? From 28b5f5643a0f820da84e9f89fd22cfe8627c5df1 Mon Sep 17 00:00:00 2001 From: Damien Cassou Date: Tue, 13 Apr 2021 18:47:56 +0200 Subject: [PATCH 2/3] README: Add section "How do I add a binary cache?" --- README.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/README.md b/README.md index 2e85f52..74d17e3 100644 --- a/README.md +++ b/README.md @@ -101,6 +101,31 @@ With the following inputs: nix-env -i mypackage -f '' ``` +### How do I add a binary cache? + +If the binary cache you want to add is hosted on [Cachix](https://cachix.org/) and you are +using [cachix-action](https://github.com/cachix/cachix-action), you +should use their `extraPullNames` input like this: + +```yaml +- uses: cachix/cachix-action@vXX + with: + name: terlar + authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' + extraPullNames: nix-community +``` + +Otherwise, you can add any binary cache to nix.conf using +install-nix-action's own `extra_nix_config` input: + +```yaml +- uses: cachix/install-nix-action@vXX + with: + extra_nix_config: | + trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= + substituters = https://hydra.iohk.io https://cache.nixos.org/ +``` + ## Hacking Install the dependencies From 46e3bcf1bc8774708fc920df42100c81a6c45c81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Domen=20Ko=C5=BEar?= Date: Tue, 13 Apr 2021 19:05:53 +0200 Subject: [PATCH 3/3] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 74d17e3..82d1845 100644 --- a/README.md +++ b/README.md @@ -110,7 +110,7 @@ should use their `extraPullNames` input like this: ```yaml - uses: cachix/cachix-action@vXX with: - name: terlar + name: mycache authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' extraPullNames: nix-community ```