about summary refs log tree commit diff stats
path: root/nix-conf/home
diff options
context:
space:
mode:
Diffstat (limited to 'nix-conf/home')
-rw-r--r--nix-conf/home/includes/common.nix62
-rw-r--r--nix-conf/home/otm.nix17
2 files changed, 78 insertions, 1 deletions
diff --git a/nix-conf/home/includes/common.nix b/nix-conf/home/includes/common.nix
index 7d67b6f..9530a44 100644
--- a/nix-conf/home/includes/common.nix
+++ b/nix-conf/home/includes/common.nix
@@ -99,5 +99,67 @@ in
       tabstop = 4;
     };
   };
+
+  programs.ssh = {
+    enable = true;
+    extraConfig = ''
+      Host *
+        AddKeysToAgent yes
+        IgnoreUnknown UseKeychain
+        UseKeychain yes
+    '';
+    includes = [ "~/.ssh/config_local" ];
+    matchBlocks = {
+      "djm.ovh" = {
+        hostname = "v.djm.ovh";
+        port = 2222;
+      };
+      "devio" = {
+         hostname = "devio.us";
+         user = "deejayem";
+         port = 2222;
+      };
+      "sdf" = {
+        hostname = "sdf.org";
+        user = "deejayem";
+      };
+      "sdfeu" = {
+        hostname = "sdf-eu.org";
+        user = "deejayem";
+      };
+      "grex" = {
+        hostname = "grex.org";
+        user = "deejayem";
+      };
+      "blinkenshell" = {
+         hostname = "ssh.blinkenshell.org";
+         port = 2222;
+      };
+      "hashbang" = {
+        hostname = "de1.hashbang.sh";
+      };
+      "o1" = {
+        hostname = "130.162.163.108";
+      };
+      "o2" = {
+        hostname = "143.47.239.39";
+      };
+      "tilde.institute" = {
+        hostname = "tilde.institute";
+      };
+      "tilde.team" = {
+        hostname = "tilde.team";
+      };
+      "ctrl-c.club" = {
+        hostname = "ctrl-c.club";
+      };
+      "github.com" = {
+        hostname = "github.com";
+        user = "git";
+        identityFile = "~/.ssh/id_ed25519";
+        identitiesOnly = true;
+      };
+    };
+  };
 }
 
diff --git a/nix-conf/home/otm.nix b/nix-conf/home/otm.nix
index abb7efa..c79437b 100644
--- a/nix-conf/home/otm.nix
+++ b/nix-conf/home/otm.nix
@@ -1,4 +1,4 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
 {
   imports = [ 
     ./includes/darwin.nix
@@ -11,6 +11,21 @@
   # paths it should manage.
   home.username = "djm";
   home.homeDirectory = "/Users/djm";
+
+  programs.ssh.matchBlocks = {
+    "github.com" = lib.mkForce {
+      hostname = "github.com";
+      user = "git";
+      identityFile = "~/.ssh/id_rsa";
+      identitiesOnly = true;
+    };
+    "github.com-personal" = {
+      hostname = "github.com";
+      user = "git";
+      identityFile = "~/.ssh/id_ed25519";
+      identitiesOnly = true;
+    };
+  };
   
   # This value determines the Home Manager release that your
   # configuration is compatible with. This helps avoid breakage
ar in LICENSE' href='/andinus/orion/commit/README.org?id=12fdf3632824a3ffea9f8dfc9249cb7a27e6a2c8'>12fdf36 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46