aboutsummaryrefslogtreecommitdiff
path: root/macos.local/flake/home/programs/ssh.nix.org
blob: 28f779fcf73ac90390ed42f19112966c9176ef62 (plain)
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
#+title: SSH Configuration

Configure SSH. Keys should be added to the SSH agent. Use the system keychain on all configurations.
#+begin_src nix
  { config, pkgs, ... }:
  {
    programs.ssh = {
      enable = true;
      addKeysToAgent = "yes";
      matchBlocks = {
        "*" = {
          identityFile = "~/.ssh/id_ed25519";
          extraOptions = {
            "UseKeychain" = "yes";
          };
        };

        "aviary" = {
          hostname = "aviary.cs.umanitoba.ca";
          user = "janzenj2";
          setEnv = {
            "TERM" = "xterm";
          };
        };

        "jjanzen.ca" = {
          setEnv = {
            "TERM" = "xterm";
          };
        };

        "oracle" = {
          setEnv = {
            "TERM" = "xterm";
          };
          hostname = "jjanzen.ca";
          identityFile = "~/.ssh/oracle";
          identitiesOnly = true;
          user = "opc";
        };
      };
    };
  }
#+end_src