mirror of
https://github.com/srid/nixos-config.git
synced 2026-01-07 08:37:34 +08:00
Nixify .ssh/config using home-manager
This commit nixify's the .ssh/config using home-manager resolves #36
This commit is contained in:
parent
fe5b476eca
commit
14cdb431a9
2 changed files with 41 additions and 0 deletions
|
|
@ -10,6 +10,7 @@
|
|||
./tmux.nix
|
||||
./neovim.nix
|
||||
./helix.nix
|
||||
./ssh.nix
|
||||
./starship.nix
|
||||
./terminal.nix
|
||||
./git.nix
|
||||
|
|
|
|||
40
home/ssh.nix
Normal file
40
home/ssh.nix
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
{ config
|
||||
, pkgs
|
||||
, lib
|
||||
, ...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
inherit (pkgs) stdenv;
|
||||
in
|
||||
{
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
matchBlocks = {
|
||||
"*".extraOptions = mkMerge [
|
||||
(mkIf (!stdenv.isDarwin) {
|
||||
identityAgent = "${config.home.homeDirectory}/.1password/agent.sock";
|
||||
})
|
||||
(mkIf (stdenv.isDarwin) {
|
||||
identityAgent = "~/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock";
|
||||
})
|
||||
];
|
||||
actual = {
|
||||
hostname = "167.205.125.179";
|
||||
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 = "${config.home.homeDirectory}/.ssh/juspay.pub";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue