about summary refs log tree commit diff
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2020-03-05T14·22+0000
committerWilliam Carroll <wpcarro@gmail.com>2020-03-05T15·04+0000
commitdf035ca832ea9ec152743e8c594b211bcf20a086 (patch)
tree4fd1e0372fa2cfb2440854d462618b804310a901
parent86e1b82d2de410c650e96f0f2ed47987be1db72a (diff)
Use home-manager to support SSH
I didn't port everything from .ssh/config to home-manager. I omitted a few hosts
that I don't connect to anymore. I also omitted the `corp-ssh-helper`
configuration.
-rw-r--r--configs/shared/.config/nixpkgs/home.nix14
-rw-r--r--configs/shared/.ssh/config26
2 files changed, 14 insertions, 26 deletions
diff --git a/configs/shared/.config/nixpkgs/home.nix b/configs/shared/.config/nixpkgs/home.nix
index 8a016419bf18..f87b0dfb7cfb 100644
--- a/configs/shared/.config/nixpkgs/home.nix
+++ b/configs/shared/.config/nixpkgs/home.nix
@@ -43,6 +43,20 @@
     };
   };
 
+  programs.ssh = {
+    enable = true;
+    matchBlocks = {
+      desktop = {
+        user = "wpcarro";
+        hostname = "zeno.lon.corp.google.com";
+      };
+      socrates = {
+        user = "wpcarro";
+        hostname = "84.92.33.141";
+      };
+    };
+  };
+
   ##############################################################################
   # Services
   ##############################################################################
diff --git a/configs/shared/.ssh/config b/configs/shared/.ssh/config
deleted file mode 100644
index 67d82ac7e754..000000000000
--- a/configs/shared/.ssh/config
+++ /dev/null
@@ -1,26 +0,0 @@
-# Google work station
-Host desktop
-  Hostname zeno.lon.corp.google.com
-
-# Google cloud instance
-Host cloudtop
-  Hostname wpcarro.c.googlers.com
-
-Host gcp
-  User wpcarro
-  Hostname 35.246.93.73
-
-# Laptop running in my flat
-Host socrates
-  User wpcarro
-  Hostname 84.92.33.141
-
-# Raspberry Pi home computer
-# router_public_ip: 150.143.40.77
-# private_ip: 192.168.1.67
-Host rpi
-  User pi
-  Hostname 150.143.40.77
-
-Match host *.corp.google.com
-  ProxyCommand corp-ssh-helper %h %p