Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Use identity_file as a deployment key #452

Merged
merged 1 commit into from
Jan 31, 2025

Conversation

a-kenji
Copy link
Contributor

@a-kenji a-kenji commented Jan 13, 2025

Will now use the provided -i (identity_file) as a stable deployment key - if specified - rather than always generating a random ephemeral SSH key.

This is primarily useful for the following reasons:

  • error recovery
  • controlled phases

Error Recovery

If nixos-anywhere stops with an error, we might want to connect remotely to the deployed machine. With the ephemeral key this might not be possible, because we don't necessarily have access to it anymore.

Controlled Phases

It is already possible to control which phases should be run. With an ephemeral key outside our control we are not able to resume the phases with a second nixos-anywhere invocation, because a different deployment key will now be generated.

Will now use the provided `-i` (identity_file) as a stable deployment
key - if specified - rather than always generating a random ephemeral
SSH key.

This is primarily useful for the following reasons:
- error recovery
- controlled phases

*Error Recovery*

If `nixos-anywhere` stops with an error, we might want to connect
remotely to the deployed machine. With the ephemeral key this might not
be possible, because we don't necessarily have access to it anymore.

*Controlled Phases*

It is already possible to control which phases should be run.
With an ephemeral key outside our control we are not able to resume
the phases with a second `nixos-anywhere` invocation, because a
different deployment key will now be generated.
Copy link
Member

@phaer phaer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM, Thanks!

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/2025-01-15-clan-weekly-changelog/58874/1

@Lassulus
Copy link
Contributor

@mergify queue

Copy link
Contributor

mergify bot commented Jan 31, 2025

queue

❌ Command disallowed due to command restrictions in the Mergify configuration.

  • sender-permission >= write

@Lassulus Lassulus merged commit 3a8ec88 into nix-community:main Jan 31, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants