feat(ssh): add configuration#175
Merged
water-sucks merged 1 commit intonix-community:mainfrom Feb 16, 2026
Merged
Conversation
f3220f3 to
d56d8ea
Compare
water-sucks
requested changes
Feb 14, 2026
d56d8ea to
571bcd3
Compare
water-sucks
requested changes
Feb 16, 2026
- Add a setting to specify the path to the known hosts file - Allow obtaining private keys via a command instead of the ssh agent - Add partial support for the `NIX_SSHOPTS` environment variable
571bcd3 to
ae66397
Compare
water-sucks
approved these changes
Feb 16, 2026
Collaborator
water-sucks
left a comment
There was a problem hiding this comment.
This is amazing! Glad the SSH support is getting some love.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a setting to specify the path to the known hosts file
I need this since I use
programs.ssh.knownHoststo set up known hosts, which stores them in/etc/ssh/ssh_known_hosts, and extra known hosts files can be set withprograms.ssh.knownHostsFiles. This setting could be improved by making it a list of files that are checked in order, but for now I think it's enough.Allow obtaining private keys via a command instead of the ssh agent
Instead of an ssh agent, I use Bitwarden to store my ssh keys and rbw to access them on the command line. I've used
memfd_createto store the key in a volatile anonymous file for automatic cleanup.Add partial support for the
NIX_SSHOPTSenvironment variableSetting this is necessary to support passing the private keys obtained via
ssh.private_key_cmdto thesshcommand run bynix-copy-closure. So adding support for users to set it directly seems natural. It's not full support since it's only used withnix-copy-closure.