feat: add Hyperspace Pods NixOS module for P2P mesh AI cluster #31

Open
Hermes wants to merge 3 commits from feat/k3s-pod-cluster into master
Collaborator

Summary

Add Hyperspace Pods NixOS module to pool GPU/CPU compute across multiple machines into a private P2P mesh AI cluster.

Changes

  • modules/nixos/services/hyperspace.nix — New NixOS module that fetches the Hyperspace CLI binary (v5.45.30), sets up systemd service, opens P2P firewall ports (libp2p 4001, chain 30301, API 8080), and configures AMD MI50 GPU passthrough via ROCm
  • hosts/lazyworkhorse/configuration.nix — Enable Hyperspace with auto profile, port 8080, ai-worker user
  • flake.nix — Register the new module

Why Hyperspace

  • Multiple machines pool VRAM to run models no single node can handle
  • P2P mesh via libp2p — no central server needed
  • OpenAI-compatible API for Cursor, Claude Code, Aider etc.
  • Raft consensus for pod state management
  • 25+ sidecars: vectors, cache, storage, search, MCP gateway

Verification

# On lazyworkhorse after deploy:
hyperspace pod create "tdnde-lab"     # create the pod
hyperspace pod invite                  # get invite link
echo $INVITE | ssh ai-worker@cyt-pi   # join from other nodes
curl http://localhost:8080/v1/chat/completions  # OpenAI API
## Summary Add Hyperspace Pods NixOS module to pool GPU/CPU compute across multiple machines into a private P2P mesh AI cluster. ## Changes - `modules/nixos/services/hyperspace.nix` — New NixOS module that fetches the Hyperspace CLI binary (v5.45.30), sets up systemd service, opens P2P firewall ports (libp2p 4001, chain 30301, API 8080), and configures AMD MI50 GPU passthrough via ROCm - `hosts/lazyworkhorse/configuration.nix` — Enable Hyperspace with auto profile, port 8080, ai-worker user - `flake.nix` — Register the new module ## Why Hyperspace - Multiple machines pool VRAM to run models no single node can handle - P2P mesh via libp2p — no central server needed - OpenAI-compatible API for Cursor, Claude Code, Aider etc. - Raft consensus for pod state management - 25+ sidecars: vectors, cache, storage, search, MCP gateway ## Verification ```bash # On lazyworkhorse after deploy: hyperspace pod create "tdnde-lab" # create the pod hyperspace pod invite # get invite link echo $INVITE | ssh ai-worker@cyt-pi # join from other nodes curl http://localhost:8080/v1/chat/completions # OpenAI API ``` ## Related - Skill: `nixos-hyperspace-pods` - https://hyperspace.sh
Hermes added 3 commits 2026-05-02 15:41:47 +00:00
- Updated roadmap phase status (Phase 4 complete)
- Added merge priority table with PR #28 (security) at top
- Documented that security must merge before new services exposed
- Added deployment command reference
Hyperspace Pods let multiple machines pool their GPUs into one private
P2P mesh AI cluster. Models are split across all connected GPUs —
e.g. two machines with 16GB VRAM each can run Qwen 3.5 32B together.

Changes:
- Add modules/nixos/services/hyperspace.nix — NixOS module that:
  * Fetches the Hyperspace CLI binary (v5.45.30) via fetchurl
  * Sets up systemd service for the agent
  * Opens firewall ports (libp2p 4001, chain 30301, API 8080)
  * Configures GPU passthrough for AMD MI50 (ROCm)
- Register module in flake.nix for lazyworkhorse
- Enable hyperspace service on lazyworkhorse (ai-worker user, port 8080)

Usage after deployment:
  hyperspace pod create "tdnde-lab"   # create pod
  hyperspace pod invite                # share invite with cyt-pi
  curl http://localhost:8080/v1/chat/completions  # OpenAI API

See skill: nixos-hyperspace-pods
This pull request has changes conflicting with the target branch.
  • assets/compose
  • flake.nix
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin feat/k3s-pod-cluster:feat/k3s-pod-cluster
git checkout feat/k3s-pod-cluster
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: gortium/infra#31
No description provided.