Parameterize remote deployment repository path #126

Open
opened 2026-07-31 18:39:07 +01:00 by nimmo · 0 comments
Owner

Goal

Make the packaged nixos-deploy --host <hostname> workflow usable when the remote checkout is not /home/nimmo/nixos-config.

Context

PR #125 introduced the reusable nixos-deploy command and preserved the existing remote delegation behavior. The delegation currently runs:

cd /home/nimmo/nixos-config && nix run .#nixos-deploy -- ...

That path matches the current fleet convention but is an implicit environment assumption.

Scope

  • Add an explicit configuration mechanism such as NIXOS_DEPLOY_REMOTE_REPO for the remote checkout path.
  • Preserve /home/nimmo/nixos-config as the compatibility default.
  • Ensure the value is safely quoted in the remote SSH command.
  • Document the override and its expected use cases.
  • Add regression coverage for the generated remote command or delegation arguments.

Acceptance criteria

  • Remote delegation works with the default repository path.
  • Remote delegation works with a non-standard configured checkout path.
  • Repository paths containing shell-sensitive characters are handled safely, or explicitly rejected with a clear error.
  • Existing local deployment and host/specialisation argument behavior is unchanged.
  • Shell linting, focused regression tests, and nix flake check pass.

Follow-up to PR #125.

## Goal Make the packaged `nixos-deploy --host <hostname>` workflow usable when the remote checkout is not `/home/nimmo/nixos-config`. ## Context PR #125 introduced the reusable `nixos-deploy` command and preserved the existing remote delegation behavior. The delegation currently runs: cd /home/nimmo/nixos-config && nix run .#nixos-deploy -- ... That path matches the current fleet convention but is an implicit environment assumption. ## Scope - Add an explicit configuration mechanism such as `NIXOS_DEPLOY_REMOTE_REPO` for the remote checkout path. - Preserve `/home/nimmo/nixos-config` as the compatibility default. - Ensure the value is safely quoted in the remote SSH command. - Document the override and its expected use cases. - Add regression coverage for the generated remote command or delegation arguments. ## Acceptance criteria - Remote delegation works with the default repository path. - Remote delegation works with a non-standard configured checkout path. - Repository paths containing shell-sensitive characters are handled safely, or explicitly rejected with a clear error. - Existing local deployment and host/specialisation argument behavior is unchanged. - Shell linting, focused regression tests, and `nix flake check` pass. Follow-up to PR #125.
Sign in to join this conversation.
No milestone
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#126
No description provided.