From d90598bb0bb7e054f2a2fd48c80dcc688849c863 Mon Sep 17 00:00:00 2001 From: Amitai Burstein Date: Wed, 25 Jun 2025 13:13:44 +0300 Subject: [PATCH 1/3] Add a Cachix stub --- .github/workflows/test.yml | 14 ++++++++++++++ flake.nix | 9 +++++++++ 2 files changed, 23 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7ef73a6..89eae96 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -37,6 +37,14 @@ jobs: name: digitallyinduced skipPush: true + # # Initialize custom cachix for pushing + # - name: Custom Cachix Init + # uses: cachix/cachix-action@v15 + # with: + # name: CHANGE-ME + # authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' + # skipPush: true + # Free up disk space before building - name: Free disk space run: | @@ -68,6 +76,12 @@ jobs: # Execute the tests. runghc $(make print-ghc-extensions) -i. -ibuild -iConfig Test/Main.hs + # Push to cachix after successful tests + # - name: Push to Cachix + # if: github.ref == 'refs/heads/main' + # run: | + # nix build --no-link --json .#nixosConfigurations.qa.config.system.build.toplevel | jq -r '.[].outputs.out' | cachix push CHANGE-ME + deploy: name: Deploy needs: tests diff --git a/flake.nix b/flake.nix index 624da5f..8ef2923 100644 --- a/flake.nix +++ b/flake.nix @@ -1,4 +1,13 @@ { + nixConfig = { + extra-substituters = [ + "https://CHANGE-ME.cachix.org" + ]; + extra-trusted-public-keys = [ + "CHANGE-ME.cachix.org-1:CHANGE-ME-PUBLIC-KEY" + ]; + }; + inputs = { ihp.url = "github:digitallyinduced/ihp/v1.3"; nixpkgs.follows = "ihp/nixpkgs"; From 9ab6b86775b8eca02ef57e56d8a2ec399be81dd8 Mon Sep 17 00:00:00 2001 From: Amitai Burstein Date: Wed, 25 Jun 2025 13:15:03 +0300 Subject: [PATCH 2/3] Add comments --- flake.nix | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/flake.nix b/flake.nix index 8ef2923..00b5f3f 100644 --- a/flake.nix +++ b/flake.nix @@ -1,12 +1,14 @@ { - nixConfig = { - extra-substituters = [ - "https://CHANGE-ME.cachix.org" - ]; - extra-trusted-public-keys = [ - "CHANGE-ME.cachix.org-1:CHANGE-ME-PUBLIC-KEY" - ]; - }; + # Add own cachix cache here to speed up builds. + # Uncomment the following lines and replace `CHANGE-ME` with your cachix cache name + # nixConfig = { + # extra-substituters = [ + # "https://CHANGE-ME.cachix.org" + # ]; + # extra-trusted-public-keys = [ + # "CHANGE-ME.cachix.org-1:CHANGE-ME-PUBLIC-KEY" + # ]; + # }; inputs = { ihp.url = "github:digitallyinduced/ihp/v1.3"; From 7c4568653787438c5b49295289271a505cdcbd7a Mon Sep 17 00:00:00 2001 From: Amitai Burstein Date: Tue, 8 Jul 2025 12:33:53 +0300 Subject: [PATCH 3/3] Move to bottom of flake.nix --- flake.nix | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/flake.nix b/flake.nix index 00b5f3f..ed95d5b 100644 --- a/flake.nix +++ b/flake.nix @@ -1,15 +1,4 @@ { - # Add own cachix cache here to speed up builds. - # Uncomment the following lines and replace `CHANGE-ME` with your cachix cache name - # nixConfig = { - # extra-substituters = [ - # "https://CHANGE-ME.cachix.org" - # ]; - # extra-trusted-public-keys = [ - # "CHANGE-ME.cachix.org-1:CHANGE-ME-PUBLIC-KEY" - # ]; - # }; - inputs = { ihp.url = "github:digitallyinduced/ihp/v1.3"; nixpkgs.follows = "ihp/nixpkgs"; @@ -154,4 +143,15 @@ }; }; + + # Add own cachix cache here to speed up builds. + # Uncomment the following lines and replace `CHANGE-ME` with your cachix cache name + # nixConfig = { + # extra-substituters = [ + # "https://CHANGE-ME.cachix.org" + # ]; + # extra-trusted-public-keys = [ + # "CHANGE-ME.cachix.org-1:CHANGE-ME-PUBLIC-KEY" + # ]; + # }; }