Collectivenix fleet

30 machines · 4 platform classes · 1 registry

Nix fleet configuration

One flake. Every machine.

Collective is a typed Nix flake that configures thirty machines, from NixOS servers and WSL devboxes to a Mac, its Linux VM and Android phones. They share one registry, one module tree and one command, and their builds happen somewhere else first.

The fleet as a networkA metro map. On the left, four green source lines (about seventy flake inputs, the module tree, collective-lib and SOPS secrets) converge on one interchange, the machine registry. Five lines leave it. WSL devboxes, nine machines, whose stations are development, CI runners, Attic binary caches and Azure token brokers. NixOS, twelve machines: desktops, laptops and handhelds, servers and a microVM. macOS, one Mac, with a branch to its Linux VM, an aarch64 NixOS guest. Android, five phones and tablets: Termux bridges, native Tailscale and nested desktops. Home Manager, two standalone home-only configurations. ~70 flake inputs module tree collective-lib SOPS secrets development CI runners Attic caches token brokers WSL DEVBOXES 9 desktops laptops, handhelds servers microVM NIXOS 12 the Mac aarch64 Linux VM MACOS 1 phones, tablets Termux bridge native Tailscale nested desktops ANDROID 5 home-only HOME MANAGER 2 runs NixOS registry .nix
The fleet as a networkA portrait metro map. At the top, flake inputs, modules, collective-lib and secrets feed one interchange, the machine registry. A trunk line runs down from it with five branches. WSL devboxes, nine: development, CI runners, Attic caches, token brokers. NixOS, twelve: desktops, laptops and handhelds, servers, a microVM. macOS, one, with its aarch64 Linux VM. Android, five: phones and tablets with Termux bridges, native Tailscale and nested desktops. Home Manager, two home-only configurations. inputs · modules · collective-lib · secrets registry machines/registry.nix WSL DEVBOXES 9 development · CI runners Attic caches · token brokers NIXOS 12 desktops · laptops, handhelds servers · microVM MACOS 1 the Mac its aarch64 Linux VM (NixOS) ANDROID 5 phones, tablets · Termux bridge native Tailscale · nested desktops HOME MANAGER 2 home-only configurations
The fleet as a network.Every machine class leaves from the same interchange: a typed registry that the flake, scripts and services all read.

30machines in one registry

4platform classes: NixOS, nix-darwin, Nix-on-Droid, Home Manager

6self-hosted binary caches that prebuild the others

69cltv commands, generated from Nix

Why it is built this way

Most dotfile repositories describe one computer and copy it to the next. Collective describes a fleet, so the same change lands on a phone, a laptop and a cloud devbox, and a new machine is one registry entry. Five ideas carry it.

A typed inventory
Each machine is a value such as Tagged [VM WSL] System.NixOS.X86, not a string. A misspelt platform fails evaluation instead of silently doing nothing, and every fleet list, cache map and SSH target derives from the same entries. Fleet
Assembled, not copied
Machines get their modules from their type: agnostic modules, their platform's tree, the public flake, tag modules and first-party project modules. Machine directories hold only what is genuinely theirs. Architecture
Built elsewhere
Cache nodes build other machines from an immutable revision of main and publish them. A phone activates its closure with cltv switch --cached, which refuses anything older than what it already runs. Delivery
Infrastructure as modules
The CI runner fleet, binary caches, liveness reporting and even the Windows hosts under the WSL devboxes are declared and converged like any other service. CI runners
Agents are users too
Coding agents, their skills, model gateway, credentials and fleet services are installed by the same modules, and their live configuration is editable without a rebuild. Agents & AI

The everyday loop

  1. Change a module or the registry

    Everything lives in one repository: machines in machines/, shared modules in modules/, packages in pkgs/ and live configuration in standalone/.

  2. Evaluate without switching

    Ask the evaluated configuration of any machine a question before anything is built.

    cltv nix eval home -e 'config.programs.zsh.enable'cltv nix eval system -e 'config.services.openssh.enable' \    --system-name NAME --system-type nixos
  3. Try a package without installing it

    Run any package from the configured package set at the checkout's pins, without touching the profile.

    cltv run tools#aztts -- --version
  4. Push to main; cache nodes prebuild

    Every two hours, each cache node archives the newest revision of main, builds the machines assigned to it and publishes them to its Attic cache.

  5. Switch

    Evaluate and build here, or activate the prebuilt generation, or pull and switch a list of machines at once, each in its own tmux window over SSH.

    cltv switchcltv switch --cachedjust collective-switch all --cached

Where to go