Self-hosted Tangled spindle

S2: Use the VM's hardware config and the env file's bucket (ENG-468) #3

Merged demi.dev
targeting main from stoopkidddd/eng-468-s2-deploy-the-executor-and-connect-it-to-the-mill
Merged opened by and assigned to demi.dev
targeting main from stoopkidddd/eng-468-s2-deploy-the-executor-and-connect-it-to-the-mill

Linear: ENG-468

Summary #

These are the repo changes the executor needs before the lead deploys it to spindle-exec-1. The deploy itself (token, env file, nixos-rebuild switch, reboot and LAN checks) happens on the VM and the mill, and its results go in the Linear issue.

  • executor/hardware-configuration.nix: replaces the placeholder with the VM's real hardware config.
    • Taken from the output of nixos-generate-config --show-hardware-config: the initrd modules ahci xhci_pci virtio_pci virtio_blk, kvm-amd and swapDevices = [ ].
    • Keeps the bootstrap's GRUB on /dev/vda, growPartition, the ttyS0 console, DHCP and qemuGuest.
    • The root filesystem stays at /dev/disk/by-label/nixos with autoResize, rather than the generated by-UUID path. The bootstrap image labels it, so the label is stable.
  • executor/configuration.nix: the S3 bucket placeholder becomes "".
    • The real bucket name (spindle-artifacts-<hash>) goes into /var/lib/secrets/spindle-executor.env as SPINDLE_ARTIFACT_STORES_S3_BUCKET, together with the AWS_* values piped from Railway.
    • systemd's EnvironmentFile= overrides Environment=, so the env file's value wins.

Verify #

$ mise run check
/nix/store/bgyd1x38p1rna7774vq9ca1i7ihbj5rb-nixos-system-spindle-exec-1-26.05.20261031.fa13731.drv
check_exit=0
$ nix eval (selected)
{"bucket":"","envFile":"/var/lib/secrets/spindle-executor.env","root":"/dev/disk/by-label/nixos", kvm ⊇ ["kvm-amd"], initrd ⊇ ["ahci","xhci_pci","virtio_pci","virtio_blk"]}

The lane is local-only, and there's no CI yet.

🤖 Generated with Claude Code

Commits 1

S2: Use the VM's hardware config and the env file's bucket (ENG-468)