feat(openclaw): add runtime closure meta-package for Harmonia caching
Creates openclaw-runtime-closure as a symlinkJoin of all runtime dependencies (nodejs_22, kubectl, jq, git, emacs, tsx, tea, python3.withPackages pymupdf, qmd) that will be pushed to the Harmonia binary cache by CI and pulled into the PVC by the init container at pod startup. This meta-package enables the thin Docker image architecture where: - The Docker image stays small (~1.5GB vs 2.7GB) with only /app, nix, and basics - Runtime deps are fetched from Harmonia at pod startup via nix copy --from - CI push is fast (thin image) and runtime deps are cached separately Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -308,6 +308,7 @@
|
||||
"nix-deck-kernel" = self.nixosConfigurations.nix-deck.config.boot.kernelPackages.kernel;
|
||||
# OpenClaw docker image (pulled + augmented with nix tools)
|
||||
"openclaw-image" = pkgs.custom.openclaw-image;
|
||||
"openclaw-runtime-closure" = pkgs.custom.openclaw-runtime-closure;
|
||||
}
|
||||
else
|
||||
{ }
|
||||
|
||||
@@ -10,4 +10,5 @@ rec {
|
||||
opencode = pkgs.callPackage ./opencode { };
|
||||
qmd = pkgs.callPackage ./qmd { };
|
||||
openclaw-image = pkgs.callPackage ./openclaw-image { inherit qmd; };
|
||||
openclaw-runtime-closure = pkgs.callPackage ./openclaw-image/runtime-closure.nix { inherit qmd; };
|
||||
}
|
||||
|
||||
22
packages/openclaw-image/runtime-closure.nix
Normal file
22
packages/openclaw-image/runtime-closure.nix
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
pkgs,
|
||||
qmd,
|
||||
}:
|
||||
|
||||
# This package creates a store path that transitively depends on all packages
|
||||
# that should be available at runtime in the OpenClaw pod.
|
||||
# CI uses this to push a single closure to Harmonia.
|
||||
pkgs.symlinkJoin {
|
||||
name = "openclaw-runtime-closure";
|
||||
paths = [
|
||||
pkgs.nodejs_22
|
||||
pkgs.kubectl
|
||||
pkgs.jq
|
||||
pkgs.git
|
||||
pkgs.emacs
|
||||
pkgs.tsx
|
||||
pkgs.tea
|
||||
(pkgs.python3.withPackages (ps: [ ps.pymupdf ]))
|
||||
qmd
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user