diff options
author | Ben Sima <ben@bsima.me> | 2021-11-01 12:16:34 -0600 |
---|---|---|
committer | Ben Sima <ben@bsima.me> | 2021-11-01 12:16:34 -0600 |
commit | 22950ff17da1d197f55f1e73783da9077c2e3cdb (patch) | |
tree | 7736a93fb99ebc3103429958ae6dd9cab7950721 /lib/ssh.nix | |
parent | e71cabacfd3af0e4426d7cfd1edbabf564b8fd4d (diff) |
extract programs.{ssh,emacs}
Diffstat (limited to 'lib/ssh.nix')
-rw-r--r-- | lib/ssh.nix | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/lib/ssh.nix b/lib/ssh.nix new file mode 100644 index 0000000..9cbb05b --- /dev/null +++ b/lib/ssh.nix @@ -0,0 +1,76 @@ +{ ... }: + +let + homedir = builtins.getEnv "HOME"; +in { + programs.ssh = { + enable = true; + forwardAgent = true; + extraConfig = '' + StrictHostKeyChecking=accept-new + + # sft ssh-config + Match exec "/usr/local/bin/sft resolve -q %h" + ProxyCommand "/usr/local/bin/sft" proxycommand %h + UserKnownHostsFile "/Users/bsima/Library/Application Support/ScaleFT/proxycommand_known_hosts" + ''; + matchBlocks = { + "github.com" = { + hostname = "github.com"; + user = "git"; + identityFile = [ "${homedir}/.ssh/id_rsa" ]; + identitiesOnly = true; + }; + + # groq + "groq" = { + hostname = "bsima"; # must be on vpn + user = "bsima"; + identityFile = [ "${homedir}/.ssh/groq" ]; + identitiesOnly = true; + forwardAgent = true; + extraOptions = { + #"RemoteCommand" = "tmux -CC new -As0"; + "RequestTTY" = "force"; + }; + }; + + # simatime + "sabten" = { + hostname = "142.93.81.26"; + user = "root"; + identityFile = [ "${homedir}/.ssh/id_rsa" ]; + identitiesOnly = true; + }; + "serval.simatime.com" = { + hostname = "serval.simatime.com"; + user = "ben"; + identityFile = [ "${homedir}/.ssh/id_rsa" ]; + identitiesOnly = true; + }; + "simatime.com" = { + hostname = "simatime.com"; + user = "git"; + identityFile = [ "${homedir}/.ssh/id_rsa" ]; + identitiesOnly = true; + }; + "lithium" = { + hostname = "192.168.1.9"; + user = "ben"; + identityFile = [ "${homedir}/.ssh/id_rsa" ]; + identitiesOnly = true; + }; + "dev.simatime.com" = { + user = "ben"; + identityFile = [ "${homedir}/.ssh/id_rsa" ]; + identitiesOnly = true; + }; + "git.platonic.systems" = { + hostname = "git.platonic.systems"; + user = "git"; + identityFile = [ "${homedir}/.ssh/platonic.systems" ]; + identitiesOnly = true; + }; + }; + }; +} |