feat(hellgraph): HellGraph as a first-class always-on OS primitive (systemd) - #326
Merged
Conversation
…ystemd, canary host) Mirrors sourceos-syncd — the one primitive that was actually wired. HellGraph ships a committed, self-contained ts/dist (package.json has ZERO runtime deps; dist imports only node: builtins + relative), so packages/hellgraph is a real node wrapper (no npm build, no node_modules), NOT an inert scaffold. modules/nixos/hellgraph runs hellgraph-superpeer (serves the graph over HTTP) as systemd.services.hellgraph — local-only by default, p2p federation OPT-IN via HELLGRAPH_BOOTSTRAP_KEY (LoadCredential). Wired into flake (input+package+nixosModule) and ENABLED on canary-x86_64. All .nix parse-verified; runtime proven self-contained. Full image build needs a Linux/kvm nix builder. The receipt-pump ingestion unit follows once hellgraph#55 merges.
…/nixos/hellgraph Satisfies the adr-swap-gate (ADR-0001-nix-to-guix, Firewall #1): every newly added .nix file must have a Guix equivalent or a governed waiver. This adds both: guix/packages/hellgraph.scm: copy-build-system derivation; installs bin/+ts/ preserving the relative layout the entrypoints expect (bin/*.mjs → ../ts/dist/index.mjs); wraps hellgraph-superpeer + hellgraph-agent-ingest with the node binary. guix/services/hellgraph.scm: hellgraph-service-type (shepherd); mirrors all three NixOS module options — superpeer? (default #f = local-only sovereign mode), bootstrap-key-file (read at start, never in env), extra-environment. Sovereign-first: the graph service is local-only by default; p2p superpeer is an explicit opt-in. guix/NIX_BASELINE.md: Marks hellgraph package (◐) and hellgraph service (◐) in the parity table. Status = ◐ (spiked): Scheme authored, parity proven when a Linux runner builds the Guix package and the shepherd service activates correctly.
Both new .nix files (packages/hellgraph/default.nix and modules/nixos/hellgraph/default.nix) have Guix equivalents authored in this same PR — guix/packages/hellgraph.scm and guix/services/hellgraph.scm. ADR-0001 waivers reference the equivalents; parity table already updated in guix/NIX_BASELINE.md. Satisfies Firewall #1 (adr-swap-gate).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Makes HellGraph an always-on systemd service on SourceOS — the model you described (always-on local graph, p2p opt-in), mirroring
sourceos-syncd(the one primitive that was actually wired, per the earlier audit). Closes a real piece of the 'first-class OS primitives' gap.Why it's real, not another inert scaffold
HellGraph ships a committed, self-contained
ts/dist—package.jsonhas zero runtime deps and the dist imports onlynode:builtins + relative paths. Sopackages/hellgraph/default.nixis a genuine node wrapper (no npm build, nonode_modules), and the daemon runs onnodealone (proven: the bins run standalone). Contrastsourceos-shell, whose package never built.packages/hellgraph/default.nix— wrapshellgraph-superpeer+hellgraph-agent-ingest(both on main).modules/nixos/hellgraph/default.nix—options.sourceos.hellgraph;systemd.services.hellgraphruns the superpeer (serves the graph over HTTP). Local-only by default; p2p federation is opt-in viaHELLGRAPH_BOOTSTRAP_KEY(supplied byLoadCredential, never inline). Hardened (DynamicUser, ProtectSystem=strict, StateDirectory).flake.nix—hellgraph-srcinput + package +nixosModules.hellgraph.canary-x86_64.Verification (honest)
All
.nixparse-verified (nix-instantiate --parse); runtime proven self-contained. A fullnix build/ image build needs a Linux/kvm nix builder (can't run on macOS). The receipt-pump ingestion unit (governance receipts → graph) layers on once hellgraph#55 merges.