From b0c3402a82ca0eda57b55b6ae84bb350bc6c5bdb Mon Sep 17 00:00:00 2001 From: teq Date: Wed, 15 Apr 2026 12:42:25 -0400 Subject: [PATCH] feat(ci): add cachix publishing workflows --- .tangled/workflows/publish-cachix-aarch64.yml | 20 ++++++++++++++ .tangled/workflows/publish-cachix-x86_64.yml | 26 +++++++++++++++++++ flake.nix | 15 +++++++++++ 3 files changed, 61 insertions(+) create mode 100644 .tangled/workflows/publish-cachix-aarch64.yml create mode 100644 .tangled/workflows/publish-cachix-x86_64.yml diff --git a/.tangled/workflows/publish-cachix-aarch64.yml b/.tangled/workflows/publish-cachix-aarch64.yml new file mode 100644 index 0000000..6c306a7 --- /dev/null +++ b/.tangled/workflows/publish-cachix-aarch64.yml @@ -0,0 +1,20 @@ +when: + - event: ["push", "manual"] + branch: ["main"] + +engine: nixery + +dependencies: + nixpkgs: + - nix + - cachix + - gnugrep + +steps: + - name: Authenticate + command: | + cachix authtoken "$CACHIX_AUTH_TOKEN" + + - name: Build and push aarch64 + command: | + nix-store -qR --include-outputs $(nix-store -qd $(nix build .#packages.x86_64-linux.tranquil-pds-aarch64 --accept-flake-config --print-out-paths --no-link)) | grep -v '\.drv$' | cachix push "$CACHIX_CACHE_NAME" diff --git a/.tangled/workflows/publish-cachix-x86_64.yml b/.tangled/workflows/publish-cachix-x86_64.yml new file mode 100644 index 0000000..7c13b88 --- /dev/null +++ b/.tangled/workflows/publish-cachix-x86_64.yml @@ -0,0 +1,26 @@ +when: + - event: ["push", "manual"] + branch: ["main"] + +engine: nixery + +dependencies: + nixpkgs: + - nix + - cachix + - gnugrep + +steps: + - name: Authenticate + command: | + cachix authtoken "$CACHIX_AUTH_TOKEN" + + - name: Build and push x86_64 + command: | + nix-store -qR --include-outputs $(nix-store -qd $(nix build .#packages.x86_64-linux.tranquil-pds --accept-flake-config --print-out-paths --no-link)) | grep -v '\.drv$' | cachix push "$CACHIX_CACHE_NAME" + nix-store -qR --include-outputs $(nix-store -qd $(nix build .#packages.x86_64-linux.tranquil-frontend --accept-flake-config --print-out-paths --no-link)) | grep -v '\.drv$' | cachix push "$CACHIX_CACHE_NAME" + + - name: Build and push devShell + command: | + nix develop --accept-flake-config --profile dev-profile -c true + cachix push "$CACHIX_CACHE_NAME" dev-profile diff --git a/flake.nix b/flake.nix index efa006f..4dd180c 100644 --- a/flake.nix +++ b/flake.nix @@ -3,6 +3,21 @@ nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; }; + nixConfig = { + extra-substituters = [ + "https://tranquil.cachix.org" + "https://nix-community.cachix.org" + "https://cache.garnix.io" + "https://devenv.cachix.org" + ]; + extra-trusted-public-keys = [ + "tranquil.cachix.org-1:PoO+mGL6a6LcJiPakMDHN4E218/ei/7v2sxeDtNkSRg=" + "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" + "cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g=" + "devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw=" + ]; + }; + outputs = { self,