feat(nix): generalise remote deployment across the fleet (#237) #248
No reviewers
Labels
No labels
area:authentication
area:flake-utilities
area:performance
area:tbd
host:chaos
host:electra
host:fleet
host:lyra
host:nova
host:vega
investigation
phase:cutover
phase:deploy
phase:mcp
phase:module
phase:packaging
phase:prep
phase:validation
priority:high
priority:medium
project:attic-postgres-lyra-rollout
project:auto-update-reliability
project:auto-update-remediation
project:declarative-purity-cleanup
project:external-review
project:fleet-boundary-cleanup
project:host-facts-refactor
project:lyra-nixos-deploy
project:lyra-service-stack-migration
project:nebula-mesh-network
project:nixos-build-deployment-pipeline
project:security-hardening
project:service-stack-migration
project:vega-sillytavern-cutover
project:wiki-rebuild
repo:numtide/flake-utils
repo:numtide/nix-auth
repo:numtide/nixos-passthru-cache
repo:numtide/nix-relay
service:auto-update
service:mem0
service:nix
service:sillytavern
service:slskd
service:synthseek
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
nimmo/nixos-config!248
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/issue-237-generalise-remote-deployment"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Generalises the proven Electra → Nova → target controller workflow from #236 into a fleet-capable remote deployment interface that supports
test,boot, andswitchactions.Relates to #237.
Changes
Renamed and extended
scripts/nixos-controller-test.sh→scripts/nixos-remote-deploy.sh.test(default),boot, andswitch.boot/switch, sets the target's/nix/var/nix/profiles/systemprofile before activation.--hostand--actionflags for direct invocation.Updated
just test-remoterecipe.just test-remote vegainstead ofjust test-remote --host vega.just test-remote lyra switch.Updated documentation.
just test-controllerreferences inREADME.mdanddocs/nova-remote-builder.md.Validation
nix flake checkpasses.Remaining before closing #237
The target-side recovery scenarios (Nova outage, controller SSH unavailable after a switch) are documented but not yet exercised live. Once they are demonstrated, #237 can be closed.
Automated code review
Reviewed commit:
a65a656427794b6a38196906818801fb67d55c73Verdict: Ready to merge
No blocking or important findings were retained, and deterministic checks passed. Suggestions remain advisory.
Overall assessment
The PR refactors the remote deployment workflow by renaming
nixos-controller-test.shtonixos-remote-deploy.sh, adding support forbootandswitchactivation actions, and updating documentation. The human reviewer confirmed that previous findings regarding unsafe variable interpolation and argument parsing were fixed in a subsequent commit (a65a656). The provided diff reflects the state including these fixes (e.g., safe argument passing via$1tosh -c, explicit positional argument handling). No new security or logic defects are evident in the supplied changes.Blocking findings
None.
Important findings
None.
Suggestions
None.
Tests and validation
Questions
just test-remote vegaas a command. The Justfile definestest-remote TARGET ACTION="test". Does the Justfile syntax correctly pass the single positional argument when only the target is provided, or does it require explicit empty action handling in the shell wrapper?Review limitations
nixos-remote-deploy.shscript against actual NixOS targets.a65a656fully resolves all edge cases in argument parsing without seeing its specific diff, although the current diff appears to implement the described fixes.Diff coverage
README.md: reviewed — included in a context-limited batchdocs/nova-remote-builder.md: reviewed — included in a context-limited batchjustfiles/deploy.just: reviewed — included in a context-limited batchscripts/nixos-controller-test.sh: reviewed — included in a context-limited batchscripts/nixos-remote-deploy.sh: reviewed — included in a context-limited batchReview metadata
Thanks for the automated review. Both findings were relevant:
Unsafe interpolation in
boot/switchSSH commands — fixed.$built_toplevelis now passed as an argument to the remotesh -cscript and referenced via"$1", so it is not interpolated into the command string.Fragile positional argument parsing — fixed. The script now collects positional arguments into an array after flag processing and assigns target/action explicitly, instead of relying on the default action value.
Pushed as commit
a65a656.nix flake checkstill passes.