feat: package local NixOS deployment command #125
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!125
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/nixos-deploy-command"
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?
Implements Issue #110 by extracting the local deployment workflow into a reusable nixos-deploy flake package while keeping just deploy as a compatibility wrapper. Preserves host and specialisation selection, NVD comparison, sudo keepalive, activation, cleanup, and remote delegation. Adds mocked regression coverage and README documentation. Refs #110. Validation: nix build .#nixos-deploy --no-link; nix run .#nixos-deploy -- --help; ShellCheck; tests/nixos-deploy-regressions.sh; nix flake check.
Automated code review
Reviewed commit:
c822063c49af7f2b34eff00a259232a603ce491cVerdict: Ready to merge
No blocking or important findings were retained, and deterministic checks passed. Suggestions remain advisory.
Overall assessment
Extracts local deployment logic into a reusable nixos-deploy flake package, refactors just deploy to delegate to it, and adds regression tests. The extraction preserves all original functionality while improving testability via environment variable overrides. Two actionable findings remain regarding argument expansion and hardcoded paths in the delegation block.
Blocking findings
None.
Important findings
None.
Suggestions
"cd /home/nimmo/nixos-config && nix run .#nixos-deploy -- ${remote_args[]}"
Impact: Arguments containing spaces will be concatenated into a single word when passed over SSH, potentially breaking the remote command.
Suggested fix: Change ${remote_args[]} to ${remote_args[@]} to preserve each argument as a separate word.
Tests and validation
Questions
Review limitations
Diff coverage
README.md: reviewed — included in a context-limited batchflake.nix: reviewed — included in a context-limited batchjustfiles/deploy.just: reviewed — included in a context-limited batchpackages/nixos-deploy/default.nix: reviewed — included in a context-limited batchscripts/nixos-deploy.sh: reviewed — included in a context-limited batchtests/nixos-deploy-regressions.sh: reviewed — included in a context-limited batchReview metadata