Use ssh-agent for distributed builds #11987
Labels
feature
Feature request or proposal
remote build
The SSH store, ssh:, ssh-ng:, ... (split from protocol label 2024-07)
Is your feature request related to a problem?
I may be holding it wrong, but:
Running distributed builds with an encrypted private key seems to be impossible currently. Nix apparently takes the key file verbatim and doesn't ask the agent, and SSH's password prompt fails with
Related: #5133
Proposed solution
What should be possible is adding an encrypted key to
ssh-agent
and sharing the agent's socket with theroot
user. Then Nix must consult the agent to unlock the key.Alternative solutions
As a workaround, do all sorts of stuff where keeping an unecrypted key around in
/root/.ssh
is unproblematic.Additional context
Getting remote builds to work is a problem I had since my beginnings of using Nix, and I have strong anecdotal evidence that it's still a very important feature for new users.
https://nix.dev/tutorials/nixos/distributed-builds-setup
Checklist
Add 👍 to issues you find important.
The text was updated successfully, but these errors were encountered: