Merge pull request #43 from LovingMelody/master

Nixify .ssh/config using home-manager
This commit is contained in:
Sridhar Ratnakumar 2024-02-13 09:21:14 -05:00 committed by GitHub
commit aeb13a8b06
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 37 additions and 0 deletions

View file

@ -10,6 +10,7 @@
./tmux.nix
./neovim.nix
./helix.nix
./ssh.nix
./starship.nix
./terminal.nix
./nix.nix

36
home/ssh.nix Normal file
View file

@ -0,0 +1,36 @@
{ pkgs, ... }:
let
inherit (pkgs) stdenv;
_1passwordAgentSock =
if stdenv.isDarwin then
''"~/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock"''
else
"~/.1password/agent.sock";
in
{
programs.ssh = {
enable = true;
matchBlocks = {
"*".extraOptions = {
identityAgent = _1passwordAgentSock;
};
immediacy = {
hostname = "65.109.35.172";
user = "srid";
forwardAgent = true;
};
biryani = {
hostname = "100.97.32.60";
user = "admin";
forwardAgent = true;
};
# To clone Juspay repos.
# https://developer.1password.com/docs/ssh/agent/advanced/#match-key-with-host
"bitbucket.org" = {
identitiesOnly = true;
identityFile = "~/.ssh/juspay.pub";
};
};
};
}