summaryrefslogtreecommitdiff
path: root/lib/ssh.nix
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ssh.nix')
-rw-r--r--lib/ssh.nix76
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;
+ };
+ };
+ };
+}