From 4e544f6e46e2e01eb4e1773d11c572d7f4b6830e Mon Sep 17 00:00:00 2001 From: Andrew Bryant Date: Thu, 22 Oct 2026 15:59:29 -0400 Subject: [PATCH] flake: add cachix binary cache Adds nixConfig substituter/key for the invoiceninja-nixos cachix cache, a `just push-cache` target to build and push the package and automated test to it, and exposes the UI frontend build as a passthru output (`invoiceninja.ui`) so it can be built and pushed independently. Co-Authored-By: Claude Sonnet 5 --- flake.nix | 7 +++++++ justfile | 8 ++++++++ package.nix | 2 ++ 3 files changed, 17 insertions(+) diff --git a/flake.nix b/flake.nix index e639cfd..b70ff8c 100644 --- a/flake.nix +++ b/flake.nix @@ -1,6 +1,13 @@ { description = "An Invoice Ninja package and module."; + nixConfig = { + extra-substituters = [ "https://invoiceninja-nixos.cachix.org" ]; + extra-trusted-public-keys = [ + "invoiceninja-nixos.cachix.org-1:TmRZaji8FFVjjIw9KZmvLrxMxfP+JDThOyOX04z526A=" + ]; + }; + inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-26.05"; outputs = diff --git a/justfile b/justfile index b52cf94..6f5167c 100644 --- a/justfile +++ b/justfile @@ -36,3 +36,11 @@ boot-vm: test: nix flake check -L +[doc('Build the package and automated test, then push results to the invoiceninja-nixos cachix cache')] +[group('maintenance')] +push-cache: + nix build --print-out-paths --no-link \ + ".#invoiceninja" \ + ".#checks.x86_64-linux.invoiceninja" \ + | cachix push invoiceninja-nixos + diff --git a/package.nix b/package.nix index b03faa5..4107313 100644 --- a/package.nix +++ b/package.nix @@ -74,6 +74,8 @@ php82.buildComposerProject (finalAttrs: { inherit src version; pname = "${pname}-composer"; + passthru.ui = ui; + nativeBuildInputs = [ jq nodejs_22