From 690eac722dea6a1f9e6448eb529392b9ebcc70eb Mon Sep 17 00:00:00 2001 From: "Ying-Ruei Liang (TheKK)" Date: Sat, 3 Apr 2021 16:40:24 +0800 Subject: [PATCH 01/11] README: bump actions --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 41808d3..a100d61 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2.3.4 - - uses: cachix/install-nix-action@v12 + - uses: cachix/install-nix-action@v13 with: nix_path: nixpkgs=channel:nixos-unstable - run: nix-build @@ -52,7 +52,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2.3.4 - - uses: cachix/install-nix-action@v12 + - uses: cachix/install-nix-action@v13 with: install_url: https://nixos-nix-install-tests.cachix.org/serve/lb41az54kzk6j12p81br4bczary7m145/install install_options: '--tarball-url-prefix https://nixos-nix-install-tests.cachix.org/serve' From 87d70237f991ebee86692d32989be57b0f2df0fa Mon Sep 17 00:00:00 2001 From: Damien Cassou Date: Tue, 13 Apr 2021 18:47:42 +0200 Subject: [PATCH 02/11] 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 03/11] 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 04/11] 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 ``` From 15ad7f8d90d238f031a7b23c007b1890f3419bb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Domen=20Ko=C5=BEar?= Date: Tue, 27 Apr 2021 15:09:58 +0200 Subject: [PATCH 05/11] README: better default for building flakes --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 82d1845..349eccb 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,8 @@ jobs: install_options: '--tarball-url-prefix https://nixos-nix-install-tests.cachix.org/serve' extra_nix_config: | experimental-features = nix-command flakes - - run: nix-build + - run: nix build + - run: nix flake check ``` To install Nix from any commit, go to [the corresponding installer_test action](https://github.com/NixOS/nix/runs/2219534360) and click on "Run cachix/install-nix-action@XX" step and expand the first line. From 139e95e483c50081f2929fedc8e07e22d34a786b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 8 May 2021 07:39:54 +0000 Subject: [PATCH 06/11] Bump handlebars from 4.7.6 to 4.7.7 Bumps [handlebars](https://github.com/wycats/handlebars.js) from 4.7.6 to 4.7.7. - [Release notes](https://github.com/wycats/handlebars.js/releases) - [Changelog](https://github.com/handlebars-lang/handlebars.js/blob/master/release-notes.md) - [Commits](https://github.com/wycats/handlebars.js/compare/v4.7.6...v4.7.7) Signed-off-by: dependabot[bot] --- yarn.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/yarn.lock b/yarn.lock index 78c9fe4..6764eaa 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1313,9 +1313,9 @@ growly@^1.3.0: integrity sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE= handlebars@^4.1.2: - version "4.7.6" - resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.6.tgz#d4c05c1baf90e9945f77aa68a7a219aa4a7df74e" - integrity sha512-1f2BACcBfiwAfStCKZNrUCgqNZkGsAT7UM3kkYtXuLo0KnaVfjKOyf7PRzB6++aK9STyT1Pd2ZCPe3EGOXleXA== + version "4.7.7" + resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.7.tgz#9ce33416aad02dbd6c8fafa8240d5d98004945a1" + integrity sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA== dependencies: minimist "^1.2.5" neo-async "^2.6.0" @@ -3442,9 +3442,9 @@ typescript@^3.5.1: integrity sha512-N7bceJL1CtRQ2RiG0AQME13ksR7DiuQh/QehubYcghzv20tnh+MQnQIuJddTmsbqYj+dztchykemz0zFzlvdQw== uglify-js@^3.1.4: - version "3.10.4" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.10.4.tgz#dd680f5687bc0d7a93b14a3482d16db6eba2bfbb" - integrity sha512-kBFT3U4Dcj4/pJ52vfjCSfyLyvG9VYYuGYPmrPvAxRw/i7xHiT4VvCev+uiEMcEEiu6UNB6KgWmGtSUYIWScbw== + version "3.13.5" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.13.5.tgz#5d71d6dbba64cf441f32929b1efce7365bb4f113" + integrity sha512-xtB8yEqIkn7zmOyS2zUNBsYCBRhDkvlNxMMY2smuJ/qA8NCHeQvKCF3i9Z4k8FJH4+PJvZRtMrPynfZ75+CSZw== underscore@1.8.3: version "1.8.3" From c33708602135a4381e36eee3c3e24c35b19ed68d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 8 May 2021 19:31:40 +0000 Subject: [PATCH 07/11] Bump hosted-git-info from 2.8.4 to 2.8.9 Bumps [hosted-git-info](https://github.com/npm/hosted-git-info) from 2.8.4 to 2.8.9. - [Release notes](https://github.com/npm/hosted-git-info/releases) - [Changelog](https://github.com/npm/hosted-git-info/blob/v2.8.9/CHANGELOG.md) - [Commits](https://github.com/npm/hosted-git-info/compare/v2.8.4...v2.8.9) Signed-off-by: dependabot[bot] --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 6764eaa..ca7c8a6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1391,9 +1391,9 @@ has@^1.0.1, has@^1.0.3: function-bind "^1.1.1" hosted-git-info@^2.1.4: - version "2.8.4" - resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.4.tgz#44119abaf4bc64692a16ace34700fed9c03e2546" - integrity sha512-pzXIvANXEFrc5oFFXRMkbLPQ2rXRoDERwDLyrcUxGhaZhgP54BBSl9Oheh7Vv0T090cszWBxPjkQQ5Sq1PbBRQ== + version "2.8.9" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.9.tgz#dffc0bf9a21c02209090f2aa69429e1414daf3f9" + integrity sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw== html-encoding-sniffer@^1.0.2: version "1.0.2" From d4ff692ea47c55c7eb6dacf102c99a948915cf87 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 May 2021 11:24:33 +0000 Subject: [PATCH 08/11] Bump lodash from 4.17.19 to 4.17.21 Bumps [lodash](https://github.com/lodash/lodash) from 4.17.19 to 4.17.21. - [Release notes](https://github.com/lodash/lodash/releases) - [Commits](https://github.com/lodash/lodash/compare/4.17.19...4.17.21) Signed-off-by: dependabot[bot] --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index ca7c8a6..375e0e1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2221,9 +2221,9 @@ lodash.sortby@^4.7.0: integrity sha1-7dFMgk4sycHgsKG0K7UhBRakJDg= lodash@^4.17.11, lodash@^4.17.13: - version "4.17.19" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.19.tgz#e48ddedbe30b3321783c5b4301fbd353bc1e4a4b" - integrity sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ== + version "4.17.21" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" + integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== loose-envify@^1.0.0: version "1.4.0" From dad6e949b68aa4e511c17ac5fdb85d26222a2d80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Domen=20Ko=C5=BEar?= Date: Wed, 23 Jun 2021 18:28:56 +0200 Subject: [PATCH 09/11] README: bump installation url --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 349eccb..cac9a54 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ jobs: - uses: actions/checkout@v2.3.4 - uses: cachix/install-nix-action@v13 with: - install_url: https://nixos-nix-install-tests.cachix.org/serve/lb41az54kzk6j12p81br4bczary7m145/install + install_url: https://nixos-nix-install-tests.cachix.org/serve/i6laym9jw3wg9mw6ncyrk6gjx4l34vvx/install install_options: '--tarball-url-prefix https://nixos-nix-install-tests.cachix.org/serve' extra_nix_config: | experimental-features = nix-command flakes From 5d66827b21a98b942298769d83b7d36e8e6b0663 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Domen=20Ko=C5=BEar?= Date: Wed, 23 Jun 2021 18:29:43 +0200 Subject: [PATCH 10/11] bump installer --- .github/workflows/test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 40ae941..28560bb 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -71,7 +71,7 @@ jobs: - name: Install Nix uses: ./ with: - install_url: https://nixos-nix-install-tests.cachix.org/serve/lb41az54kzk6j12p81br4bczary7m145/install + install_url: https://nixos-nix-install-tests.cachix.org/serve/i6laym9jw3wg9mw6ncyrk6gjx4l34vvx/install install_options: '--tarball-url-prefix https://nixos-nix-install-tests.cachix.org/serve' extra_nix_config: | experimental-features = nix-command flakes @@ -89,7 +89,7 @@ jobs: - name: Install Nix uses: ./ with: - nix_path: nixpkgs=channel:nixos-20.03 - install_url: https://nixos-nix-install-tests.cachix.org/serve/lb41az54kzk6j12p81br4bczary7m145/install + nix_path: nixpkgs=channel:nixos-21.05 + install_url: https://nixos-nix-install-tests.cachix.org/serve/i6laym9jw3wg9mw6ncyrk6gjx4l34vvx/install install_options: '--tarball-url-prefix https://nixos-nix-install-tests.cachix.org/serve' - run: nix-build test.nix From 76107d4eb5611097348218cd1e7a87b48d481cdd Mon Sep 17 00:00:00 2001 From: Manuel Mendez Date: Wed, 23 Jun 2021 22:57:44 -0400 Subject: [PATCH 11/11] Drop use of sudo when tee'ing nix.conf sudo has stuck around since the early days of this repo when /etc/nix/nix.conf was being created/mutated and required `sudo`. This was changed to a different/local file where sudo is no longer needed in commit 642cfa0200128cfdd6c201f97398c427100891a2. --- lib/install-nix.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/install-nix.sh b/lib/install-nix.sh index fa097a8..61c4fe3 100755 --- a/lib/install-nix.sh +++ b/lib/install-nix.sh @@ -8,7 +8,7 @@ fi # Configure Nix add_config() { - echo "$1" | sudo tee -a /tmp/nix.conf >/dev/null + echo "$1" | tee -a /tmp/nix.conf >/dev/null } # Set jobs to number of cores add_config "max-jobs = auto"