mirror of
https://github.com/srid/nixos-config.git
synced 2026-05-11 17:36:07 +08:00
Merge pull request #43 from LovingMelody/master
Nixify .ssh/config using home-manager
This commit is contained in:
commit
aeb13a8b06
2 changed files with 37 additions and 0 deletions
|
|
@ -10,6 +10,7 @@
|
|||
./tmux.nix
|
||||
./neovim.nix
|
||||
./helix.nix
|
||||
./ssh.nix
|
||||
./starship.nix
|
||||
./terminal.nix
|
||||
./nix.nix
|
||||
|
|
|
|||
36
home/ssh.nix
Normal file
36
home/ssh.nix
Normal 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";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue