Extract local deploy into a reusable operational command #110

Open
opened 2026-07-28 08:15:55 +01:00 by nimmo · 0 comments
Owner

Goal

Move the implementation of local deployment out of the Just recipe and expose it as a reusable, explicitly packaged command.

Scope

  • Extract the current local deploy implementation: host/specialisation selection, build output handling, NVD comparison, sudo keepalive, activation, and cleanup.
  • Provide a stable command interface such as nixos-deploy through the flake's package/app surface.
  • Keep just deploy as a thin compatibility wrapper initially.
  • Preserve Electra's hardware-presence specialisation rules: dgpu only when the expansion bay is installed, igpu when it is absent.
  • Preserve current build, diff, activation, cleanup, and failure semantics.

Non-goals

  • Do not move deploy-remote; it is deliberately a Just workflow that stages the working tree with rsync and invokes deployment remotely.
  • Do not move test; it remains a workflow around temporary activation.
  • Do not change deployment policy or add unattended deployment.

Acceptance criteria

  • nixos-deploy supports the current local deployment modes and specialisation arguments.
  • just deploy delegates to the packaged command without duplicating the implementation.
  • Local deployment behavior is unchanged, including NVD output and cleanup on failure.
  • The command has declared runtime dependencies and can be exercised from the flake/development environment.
  • Shell linting, flake checks, and focused deployment-command regression coverage pass.
  • README command documentation explains when to use nixos-deploy, just deploy, and just deploy-remote.
## Goal Move the implementation of local deployment out of the Just recipe and expose it as a reusable, explicitly packaged command. ## Scope - Extract the current local `deploy` implementation: host/specialisation selection, build output handling, NVD comparison, sudo keepalive, activation, and cleanup. - Provide a stable command interface such as `nixos-deploy` through the flake's package/app surface. - Keep `just deploy` as a thin compatibility wrapper initially. - Preserve Electra's hardware-presence specialisation rules: `dgpu` only when the expansion bay is installed, `igpu` when it is absent. - Preserve current build, diff, activation, cleanup, and failure semantics. ## Non-goals - Do not move `deploy-remote`; it is deliberately a Just workflow that stages the working tree with rsync and invokes deployment remotely. - Do not move `test`; it remains a workflow around temporary activation. - Do not change deployment policy or add unattended deployment. ## Acceptance criteria - `nixos-deploy` supports the current local deployment modes and specialisation arguments. - `just deploy` delegates to the packaged command without duplicating the implementation. - Local deployment behavior is unchanged, including NVD output and cleanup on failure. - The command has declared runtime dependencies and can be exercised from the flake/development environment. - Shell linting, flake checks, and focused deployment-command regression coverage pass. - README command documentation explains when to use `nixos-deploy`, `just deploy`, and `just deploy-remote`.
Sign in to join this conversation.
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
nimmo/nixos-config#110
No description provided.