summaryrefslogtreecommitdiff
path: root/users/seth/programs/ssh.nix
blob: 055f51c02d5ba8977b2b4f57e29ab066d1e0d63e (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
45
46
{
  config,
  pkgs,
  ...
}: {
  programs.ssh = {
    enable = true;
    package = pkgs.openssh;

    matchBlocks = let
      sshDir = "${config.home.homeDirectory}/.ssh";
    in {
      # git forges
      "github.com" = {
        identityFile = "${sshDir}/github";
        user = "git";
      };

      "codeberg.org" = {
        identityFile = "${sshDir}/codeberg";
        user = "git";
      };

      # linux packaging
      "aur.archlinux.org" = {
        identityFile = "${sshDir}/aur";
        user = "aur";
      };

      "pagure.io" = {
        identityFile = "${sshDir}/copr";
        user = "git";
      };

      # router
      "192.168.1.1" = {
        identityFile = "${sshDir}/openwrt";
        user = "root";
      };

      # servers
      "atlas".user = "atlas";
      "p-body".user = "p-body";
    };
  };
}