Files
zeekayandHanzo Dev c61e977abf Build the sandbox and the node from one expression
The sandbox image was a 2GB blob pinned by digest, and on 2026-09-09 all
four of those digests answered 404 while their tags still resolved — the
manifests had moved underneath them and every sandbox stopped starting.
A tag is a name someone else can move; a hash is not.

Built and measured: 222MB against 2.0GB, and `nix build --rebuild`
re-derives it to the same bytes rather than promising to.

grid comes along as a module, because a node read its config.yaml only at
start and nothing reconciled it, so a rebuilt machine lost every line.

Co-authored-by: Hanzo Dev <[email protected]>
2026-09-09 12:06:03 -07:00

31 lines
950 B
Nix

{
description = "hanzoai/os — the estate's operating system, as an expression";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
};
outputs = { self, nixpkgs }:
let
systems = [ "x86_64-linux" "aarch64-linux" ];
each = f: nixpkgs.lib.genAttrs systems (system: f system nixpkgs.legacyPackages.${system});
in
{
# The images an agent's code runs in. One expression per class, the same
# classes the sandbox surface asks for by name.
packages = each (system: pkgs: import ./sandbox { inherit pkgs; });
# What a machine runs to be part of the cluster. grid's config.yaml and
# unit, as a module.
nixosModules.grid = import ./node/grid.nix;
devShells = each (system: pkgs: {
default = pkgs.mkShell {
packages = [ pkgs.nixfmt-rfc-style pkgs.skopeo ];
};
});
formatter = each (system: pkgs: pkgs.nixfmt-rfc-style);
};
}