Skip to content

feat(ssh): add configuration#175

Merged
water-sucks merged 1 commit intonix-community:mainfrom
Sporif:ssh-feat-configuration
Feb 16, 2026
Merged

feat(ssh): add configuration#175
water-sucks merged 1 commit intonix-community:mainfrom
Sporif:ssh-feat-configuration

Conversation

@Sporif
Copy link
Copy Markdown
Collaborator

@Sporif Sporif commented Feb 12, 2026

  • Add a setting to specify the path to the known hosts file
    I need this since I use programs.ssh.knownHosts to set up known hosts, which stores them in /etc/ssh/ssh_known_hosts, and extra known hosts files can be set with programs.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_create to store the key in a volatile anonymous file for automatic cleanup.

  • Add partial support for the NIX_SSHOPTS environment variable
    Setting this is necessary to support passing the private keys obtained via ssh.private_key_cmd to the ssh command run by nix-copy-closure. So adding support for users to set it directly seems natural. It's not full support since it's only used with nix-copy-closure.

@Sporif Sporif force-pushed the ssh-feat-configuration branch from f3220f3 to d56d8ea Compare February 12, 2026 19:51
@Sporif Sporif force-pushed the ssh-feat-configuration branch from d56d8ea to 571bcd3 Compare February 14, 2026 21:52
 - 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
@Sporif Sporif force-pushed the ssh-feat-configuration branch from 571bcd3 to ae66397 Compare February 16, 2026 23:35
Copy link
Copy Markdown
Collaborator

@water-sucks water-sucks left a comment

Choose a reason for hiding this comment

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

This is amazing! Glad the SSH support is getting some love.

@water-sucks water-sucks merged commit fb117cf into nix-community:main Feb 16, 2026
2 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.

2 participants