From 7b5eea69f1be29b5f03a0d8a572d032f3ad510fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marijan=20Petri=C4=8Devi=C4=87?= Date: Mon, 5 Feb 2024 10:24:30 +0100 Subject: [PATCH 1/3] ci: add cspr cachix binary cache --- .github/workflows/check.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 1c3dfc7..a9a9d73 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -15,6 +15,10 @@ jobs: - uses: actions/checkout@v3 - uses: DeterminateSystems/nix-installer-action@main - uses: DeterminateSystems/magic-nix-cache-action@v2 + - uses: cachix/cachix-action@v12 + with: + name: risc0pkgs + authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' - name: System Info run: | From 1d9c5a66f39feae0b33451fede7dcea9b5818fb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marijan=20Petri=C4=8Devi=C4=87?= Date: Mon, 5 Feb 2024 10:26:35 +0100 Subject: [PATCH 2/3] flake: add cspr-cachix binary cache to nixConfig --- flake.nix | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index cb97cae..1722ced 100644 --- a/flake.nix +++ b/flake.nix @@ -1,8 +1,19 @@ { description = "A collection of risc0 related packages"; + + nixConfig = { + extra-substituters = [ + "https://risc0pkgs.cachix.org" + ]; + extra-trusted-public-keys = [ + "risc0pkgs.cachix.org-1:EY5UazX0/Q7hGCm6xQSgKX6UkpzyOf07pxjfhhRK7kE=" + ]; + }; + inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11"; }; + outputs = { self, nixpkgs, ... }: let eachSystem = systems: f: From 25b2d4b3afb08a670ce090c72bbe46dafc4870fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marijan=20Petri=C4=8Devi=C4=87?= Date: Mon, 5 Feb 2024 10:26:58 +0100 Subject: [PATCH 3/3] templates/default: add cspr-cachix binary cache to nixConfig --- templates/default/flake.nix | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/templates/default/flake.nix b/templates/default/flake.nix index f1f9bde..00b464e 100644 --- a/templates/default/flake.nix +++ b/templates/default/flake.nix @@ -1,12 +1,20 @@ { description = "risc0 project template"; + + nixConfig = { + extra-substituters = [ + "https://risc0pkgs.cachix.org" + ]; + extra-trusted-public-keys = [ + "risc0pkgs.cachix.org-1:EY5UazX0/Q7hGCm6xQSgKX6UkpzyOf07pxjfhhRK7kE=" + ]; + }; + inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; - risc0pkgs = { - url = "github:cspr-rad/risc0pkgs"; - inputs.nixpkgs.follows = "nixpkgs"; - }; + nixpkgs.follows = "risc0pkgs/nixpkgs"; + risc0pkgs.url = "github:cspr-rad/risc0pkgs"; }; + outputs = { self, nixpkgs, risc0pkgs }: let systems = [ "x86_64-linux" "x86_64-darwin" "aarch64-darwin" ];