No description
  • Nix 43.3%
  • Python 40.8%
  • Shell 12.9%
  • JavaScript 2.9%
  • CSS 0.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-10-19 02:06:33 -05:00
.vscode - fixes to infra 2026-02-07 18:20:06 -06:00
docs docs(llm1): record the dropped batch-window stagger 2026-10-19 02:06:33 -05:00
hosts fix(llm1): keep each agent's next turn in the slot that holds its conversation 2026-10-19 00:41:39 -05:00
library feat(audit): add production audit follow-up for September 2026 2026-09-12 19:42:35 -05:00
modules llm1: replace Swift 1.5 with Orca Qwen3.8-Flash-Next-Uncensored IQ4_XS 2026-10-18 14:19:10 -05:00
overrides Update hash for QEMU source in vma.nix 2026-01-18 19:59:35 -06:00
tests llm1: add bounded full-model optimization parity gate 2026-10-15 10:18:37 -05:00
tools/infra-access feat(llm1): add llm1's mesh public key; record inventory access 2026-10-06 17:28:15 -05:00
.gitignore Add new Nix configuration files for VM management and system setup 2026-01-18 14:34:55 -06:00
AGENTS.md feat: move the Strata LLM service to a dedicated llm1 VM; remove ai1 2026-10-06 16:55:03 -05:00
CHANGELOG.md docs(llm1): record exact CPU and draft transfer qualification 2026-10-15 13:13:04 -05:00
CLAUDE.md chore: update CHANGELOG and remove outdated documentation 2026-09-20 13:48:33 -05:00
flake.lock feat: move the Strata LLM service to a dedicated llm1 VM; remove ai1 2026-10-06 16:55:03 -05:00
flake.nix feat: move the Strata LLM service to a dedicated llm1 VM; remove ai1 2026-10-06 16:55:03 -05:00
README.md llm1: replace Swift 1.5 with Orca Qwen3.8-Flash-Next-Uncensored IQ4_XS 2026-10-18 14:19:10 -05:00
renovate.json feat: move the Strata LLM service to a dedicated llm1 VM; remove ai1 2026-10-06 16:55:03 -05:00

Reinitialized Infrastructure

NixOS infrastructure flake for building Proxmox VMA images and managing the Reinitialized fleet. The repository defines host configurations, reusable NixOS modules, WireGuard mesh networking, Docker-based services, secret templates, and deployment tools installed on the devenv host.

For standard NixOS options, use the NixOS manual. This documentation covers repository-specific behavior.

Quick Start

Use Host onboarding when adding a host. Keep live secret files outside the checkout and provision runtime credentials separately.

Show current flake outputs without updating flake.lock:

nix flake show path:. --no-write-lock-file

Build one host with synthetic metadata, without activating it:

nix build .#checks.x86_64-linux.rp1 --no-write-lock-file --no-link

Build one Proxmox VMA image:

nix build path:.#packages.x86_64-linux.rp1

The VMA build writes result/vzdump-qemu-<vmId>.vma.zst. Password login is locked in the image; bootstrap with the configured rnetadmin SSH key.

Current Flake Outputs

The source of truth for exported hosts is flake.nix. VM hosts are exported as both nixosConfigurations.<host> and packages.x86_64-linux.<host>.

Host VM ID VLAN Mesh IP Purpose
devenv 202 200 10.255.0.1 Development VM and fleet management tools
rp1 203 12 10.255.0.2 Reverse proxy, public ingress, DNS/mail stream proxying
apps1 204 11 10.255.0.3 Hudu, Technitium DNS primary, Stalwart, Forgejo, Jaeger, Grafana, Authentik
apps2 205 11 10.255.0.4 Technitium DNS secondary, UniFi, pgAdmin, Redis Insight, Forgejo Runner, Cinny
apps3 207 11 10.255.0.5 Immich, Tuwunel Matrix, Paperless-ngx, Pelican Panel, OCIS, SearXNG
llm1 210 11 10.255.0.9 Qwen3.8-Flash-Next-Uncensored IQ4_XS on native Strata with the passed-through GTX 1070 (llm1)
db1 206 11 10.255.0.11 PostgreSQL, Valkey, OpenTelemetry Collector, Prometheus

gs1 exists in hosts/, modules/secrets.example/, and meshTopology.nix, but it is commented out in flake.nix; .#gs1 builds and deploys do not work until it is exported.

Common Commands

Build all exported NixOS configurations without generating VMA images:

nix build \
  path:.#nixosConfigurations.devenv.config.system.build.toplevel \
  path:.#nixosConfigurations.rp1.config.system.build.toplevel \
  path:.#nixosConfigurations.apps1.config.system.build.toplevel \
  path:.#nixosConfigurations.apps2.config.system.build.toplevel \
  path:.#nixosConfigurations.apps3.config.system.build.toplevel \
  path:.#nixosConfigurations.llm1.config.system.build.toplevel \
  path:.#nixosConfigurations.db1.config.system.build.toplevel

Build a Proxmox image for one host:

nix build path:.#packages.x86_64-linux.apps1

Import a built VMA on a Proxmox host:

scp result/vzdump-qemu-204.vma.zst root@proxmox:/var/lib/vz/dump/
qmrestore /var/lib/vz/dump/vzdump-qemu-204.vma.zst 204 --storage hotData
qm start 204

Format changed Nix files when the formatter is available:

nixfmt-rfc-style <file>.nix

checks.x86_64-linux.<host> builds each exported host with checked-in synthetic metadata under pure evaluation. These are build checks, not deployment outputs. The flake does not define formatter, apps, or devShells.

Fleet Management

The devenv host installs generated tools from hosts/devenv/tools/.

Deploy one host:

rebuildHost apps1
rebuildHost llm1
rebuildHost rp1 --boot
rebuildHost devenv

Deploy every exported host with an endpoint in meshTopology.nix:

updateInfra

Important behavior:

  • rebuildHost <remote> and updateInfra use SSH as rnetadmin and pass --sudo to the remote rebuild.
  • Do not run remote deploys with sudo; the scripts reject root because root breaks the SSH key flow.
  • rebuildHost devenv is local and uses sudo nixos-rebuild internally.
  • updateInfra uses exported topology hosts except those with fleetDeployment = false.

Generate OPNsense firewall rule recommendations from traffic logs:

updateNetworkFirewallRules --dry-run

Credentials come from secrets.opnsenseFirewall on devenv, or from environment variables documented in Secrets Management.

Repository Layout

Path Purpose
flake.nix Inputs, host definitions, nixosConfigurations, VMA packages
library/ Internal helpers for NixOS configs, dual exports, VMA generation, and user modules
library/generateVMAImage/ Proxmox VMA builder and generated QEMU config
hosts/ Host-specific NixOS modules
hosts/devenv/tools/ Generated deployment and firewall helper scripts
modules/profiles/ Standard, firewall, secrets, mesh, containers, and data-disk profiles
modules/packages/ Package overrides used by service hosts
modules/secrets.example/ Checked-in templates for live secrets
/var/lib/infratainer/secrets/ External live secret overlay on devenv; never place it inside the checkout
docs/ Architecture, module, example, and investigation notes
overrides/vma.nix QEMU package override with VMA support

Documentation

Secrets

Do not put live secrets anywhere under the repository. Real host modules live in the protected external overlay /var/lib/infratainer/secrets; templates live in modules/secrets.example/<host>.nix.

Set INFRA_SECRETS_DIR=/var/lib/infratainer/secrets and use impure evaluation. When adding or renaming a secret key used by a host, update the matching example.