Repository navigation
feat(aws-nixos): rebuild NixOS from a hidden provisioner agent - #1223
Draft
phorcys420 wants to merge 1 commit into
Draft
phorcys420 wants to merge 1 commit into
phorcys420 wants to merge 1 commit into
Conversation
A root provisioner agent, started by amazon-init as a transient unit, runs the rebuild as a coder_script and then starts the main agent. The rebuild logs are native agent logs, so the custom log pusher is removed, and a failed first boot still leaves a reachable root shell.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Experiment: split the aws-nixos boot into two agents.
amazon-init starts a root
provisioneragent as a transient systemd unit. ItsNixOS rebuildscript runs the flake rebuild and then starts themainagent, also on failure. The provisioner stays connected (a disconnected agent marks the workspace unhealthy) and sits on its own hiddenterraform_dataresource, ordered aftermain.log.shpusher is removed.coder ssh <ws>.provisioner.<ws>.main).Not yet tested on a real deployment: agent-to-resource attachment, hidden-resource UX for the rebuild logs, and
nixos-rebuild switchleaving the transient unit alone.Agent-assisted with Xum using Claude Opus 5.5.