#!/usr/bin/env python3 """Create all hub pages in Wiki.js via GraphQL API.""" import json, sys JWT = sys.argv[1] if len(sys.argv) > 1 else "" pages = [ { "title": "Machines & OS", "path": "machines", "tags": ["machines", "nixos", "ubuntu"], "desc": "System configuration for all fleet machines", "content": ( '
' '
' '

MACHINES & OS

' '

NixOS and Ubuntu fleet management. Desktop configurations, server deployments, and system administration across all homelab machines.

' '
' '
Machines' '
' '

sam-desktop

NixOS 25.11 · Primary Dev

Main development workstation. Niri compositor, 62.7 GB RAM, Pi coding agent.

→
' '

nixos-desktop

NixOS · Server & Docker

Secondary NixOS machine running Docker: Mosquitto, N8N, Snapcast, Pi-Hole backup.

→
' '

sam-ubuntu1

Ubuntu · Docker Host

Primary Docker host running 47+ containers: Wiki.js, Gitea, HA, Caddy, Immich.

→
' '

Proxmox & Infrastructure

VM Hosts · Backup

Hypervisor layer, Proxmox Backup Server, and VM management.

→
' '
' '' ) }, { "title": "Docker Ecosystem", "path": "docker", "tags": ["docker", "containers", "services"], "desc": "Docker container management across two hosts", "content": ( '
' '

DOCKER ECOSYSTEM

' '

Container orchestration for 47+ self-hosted services across nixos-desktop and sam-ubuntu1. Compose stacks, port mapping, volumes, and backups.

' '
' '
' 'Host: nixos-desktop' '
' '

Mosquitto MQTT

Message Broker

Central MQTT broker for all IoT devices. Handles sensor data and event messaging.

→
' '

N8N Automation

Workflow Automation

Node-based automation connecting services, handling webhooks and NFC events.

→
' '

Snapcast Audio

Multi-Room Audio

Synchronized audio server with voice assistant integration.

→
' '

Pi-Hole Backup

DNS Redundancy

Secondary DNS server synced with primary via NebulaSync.

→
' '
' 'Host: sam-ubuntu1' '
' '

Caddy Proxy

Reverse Proxy

Reverse proxy for all *.lab.audasmedia.com.au domains with auto TLS.

→
' '

Wiki.js & Gitea

Docs & Git

This wiki platform plus self-hosted Git with CI/CD.

→
' '

Home Assistant

Smart Home

Central automation platform managing 30+ IoT devices.

→
' '

Pi-Hole & DNS

Primary DNS

Primary DNS sinkhole with ad blocking and local resolution.

→
' '
' '' ) }, { "title": "Dev & AI", "path": "dev-ai", "tags": ["dev", "ai", "pi-agent", "neovim"], "desc": "Development environment and AI coding tools", "content": ( '
' '

DEV & AI

' '

AI-powered development environment. Pi Coding Agent framework, Neovim configuration, terminal tooling, and AI skill development.

' '
' '
Core Tools' '
' '

Pi Coding Agent

Primary AI Tool

Main AI coding agent. Framework, MCP tools, sub-agents, and workflow automation.

→
' '

Neovim Setup

Editor Config

Neovim with LSP, plugins, keybindings and AI integration.

→
' '

Terminal & CLI

Shell & Tooling

Terminal multiplexing, shell config, CLI tools, and productivity workflows.

→
' '

Skills & Extensions

AI Framework

System Architect, Design Build, Security Scanning, and custom extensions.

→
' '
' 'Other Tools' '
' '

Open Code / Aider

Alternative AI Tools

Configurations for occasional use alongside Pi agent.

→
' '

Hermes / OpenClaw

Specialized Agents

Agent configurations for specialized tasks.

→
' '

Templates & Prompts

Reusable Patterns

Prompt templates and workflow patterns for AI development.

→
' '

VSCode Setup

Sporadic GUI Editor

VSCode for occasional GUI-based editing tasks.

→
' '
' '' ) }, { "title": "AI Resume System", "path": "ai-resume", "tags": ["ai-resume", "langchain", "rag", "react"], "desc": "AI-powered resume and portfolio system", "content": ( '
' '

AI RESUME SYSTEM

' '

Multi-container system that scrapes websites and Obsidian notes to build a RAG knowledge base. LangChain-powered chatbot answers questions about my work.

' '
' '
Components' '
' '

Architecture

System Design

End-to-end pipeline: scrape, ingest, embed, retrieve, chat.

→
' '

Docker Containers

Infrastructure

Scraper, vector DB, API server, React frontend, supporting services.

→
' '

LangChain Pipeline

Core AI Logic

Document chunking, embeddings, RAG, prompt templates, LLM config.

→
' '

React Websites

Frontend

Portfolio sites embedding the AI chatbot for employer showcase.

→
' '

Obsidian Ingestion

Note Pipeline

Scraping, parsing, and embedding Obsidian vaults with wikilinks.

→
' '

Content Sources

Gardening · Wiki · Notes

All ingested content: gardening, Wiki.js, Obsidian, GitHub projects.

→
' '
' '' ) }, { "title": "Home Assistant & IoT", "path": "home-iot", "tags": ["home-assistant", "iot", "esp32", "automation"], "desc": "Smart home automation and IoT project documentation", "content": ( '
' '

HOME ASSISTANT & IOT

' '

Smart home automation, ESP32 sensor networks, GPS tracking, garden systems, pet care, voice integration — 28 projects tied through HA and MQTT.

' '
' '
Architecture' '
' '

How It All Works

End-to-end IoT: sensors, MQTT, HA automations, voice, dashboards.

→
' '

Mosquitto MQTT

Broker config, topics, security, bridging devices to Home Assistant.

→
' '

Voice & Speech

Custom voice assistant, Piper TTS, Snapcast integration.

→
' '
' 'Hardware & Skills Catalog' '
' '

Electronics Guide

Soldering · Wiring

Breadboarding, connectors, relays, resistors, capacitors, foundations.

→
' '

Sensors

20+ Types

PIR, temp, humidity, light, moisture, gas, radar, GPS, ultrasonic.

→
' '

Microcontrollers

ESP32 · RPi

Dev boards, programming, flashing, power management.

→
' '

IoT Projects

28 Projects

GPS tracking, garden, pets, voice assistant, ESP32 networks, cams.

→
' '
' '' ) }, { "title": "Snapcast Audio", "path": "audio", "tags": ["snapcast", "audio", "raspberry-pi"], "desc": "Multi-room synchronized audio system", "content": ( '
' '

SNAPCAST AUDIO

' '

Synchronized multi-room audio with Snapcast. Raspberry Pi clients, voice assistant integration, and Home Assistant control.

' '
' '
' '
' '

Architecture

Snapcast server, multi-room sync, audio sources, voice integration.

→
' '

RPi Clients

Client setup, audio output, placement for room coverage.

→
' '

Configuration

Server config, stream management, latency tuning.

→
' '
' '' ) }, { "title": "Network", "path": "network", "tags": ["network", "dns", "caddy", "security", "vpn"], "desc": "Network topology and infrastructure", "content": ( '
' '

NETWORK

' '

Homelab network infrastructure spanning multiple subnets, DNS, reverse proxy, security, and VPN connectivity.

' '
' '
' '
' '

Topology

Network diagram, subnet layout, routing, device addressing.

→
' '

DNS & Pi-Hole

DNS servers, ad blocking, local resolution, DHCP config.

→
' '

Caddy Proxy

Reverse proxy, TLS, service routing, security headers.

→
' '

Security

Firewall, SSH hardening, fail2ban, network segmentation.

→
' '

VPN

VPN server, client config, remote access, site-to-site.

→
' '

Monitoring

Uptime monitoring, bandwidth tracking, alerting.

→
' '
' '' ) } ] # Build batch query mutations = [] for idx, p in enumerate(pages): content_escaped = p['content'].replace('\\', '\\\\').replace('"', '\\"').replace('\n', '\\n') tag_str = json.dumps(p['tags']) mutation = f''' p{idx}: pages {{ create( title: "{p['title']}" path: "{p['path']}" content: "{content_escaped}" editor: "wysiwyg" isPublished: true isPrivate: false locale: "en" tags: {tag_str} description: "{p['desc']}" ) {{ page {{ id path title }} responseResult {{ succeeded message }} }} }}''' mutations.append(mutation) query = 'mutation {\n' + '\n'.join(mutations) + '\n}' payload = {"query": query} print(f"Payload: {len(json.dumps(payload))} chars", file=sys.stderr) with open('/tmp/wikijs-create-hubs.json', 'w') as f: json.dump(payload, f) print(json.dumps(payload)) PYEOF