From 1567a7d761d85dbf953d1bbbed5a9d7202f98179 Mon Sep 17 00:00:00 2001 From: John Titor <50095635+JohnRTitor@users.noreply.github.com> Date: Fri, 2 Aug 2024 15:41:16 +0530 Subject: [PATCH] flake: add nix-community cache --- .github/workflows/check-flake.yml | 1 + .github/workflows/update-flake.yml | 3 ++- flake.nix | 10 ++++++++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/check-flake.yml b/.github/workflows/check-flake.yml index 2c8dd70..4c962bb 100644 --- a/.github/workflows/check-flake.yml +++ b/.github/workflows/check-flake.yml @@ -16,4 +16,5 @@ jobs: auto-optimise-store = true access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} experimental-features = nix-command flakes + accept-flake-config = true - run: nix flake check \ No newline at end of file diff --git a/.github/workflows/update-flake.yml b/.github/workflows/update-flake.yml index fdb1e43..3d24260 100644 --- a/.github/workflows/update-flake.yml +++ b/.github/workflows/update-flake.yml @@ -18,7 +18,8 @@ jobs: with: extra_nix_config: | access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} + accept-flake-config = true - name: Reformat *.nix files - run: nix fmt + run: nix - name: Update flake.lock uses: DeterminateSystems/update-flake-lock@v21 diff --git a/flake.nix b/flake.nix index d4fc36a..ff4cc4f 100644 --- a/flake.nix +++ b/flake.nix @@ -44,4 +44,14 @@ inherit specialArgs; }; }; + + # Add nix community cache + nixConfig = { + extra-substituters = [ + "https://nix-community.cachix.org" + ]; + extra-trusted-public-keys = [ + "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" + ]; + }; }