about summary refs log tree commit diff stats
path: root/hm/ssh/default.nix
blob: d123a6a1760447d07f0453feae98d615e57edfef (plain) (blame)
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
{...}: {
  services.ssh-agent.enable = true;

  programs.ssh = {
    enable = true;
    enableDefaultConfig = false;
    matchBlocks = let
      genBox = user: {
        inherit user;
        hostname = "${user}.your-storagebox.de";
      };
      username = "u384702";
    in {
      "*" = {
        forwardAgent = false;
        addKeysToAgent = "no";
        compression = false;
        serverAliveInterval = 0;
        serverAliveCountMax = 3;
        hashKnownHosts = false;
        userKnownHostsFile = "~/.ssh/known_hosts";
        controlMaster = "no";
        controlPath = "~/.ssh/master-%r@%n:%p";
        controlPersist = "no";
      };
      "storagebox" = genBox username;
      "storagebox-1" = genBox "${username}-sub1";
    };
  };
}