aboutsummaryrefslogtreecommitdiffstats
path: root/modules/programs/ssh/default.nix
blob: ac16af9b892d2f6071360ef6140bf58e8f7b2ca5 (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
{
  config,
  lib,
  pkgs,
  ...
}:

# OpenSSH - Secure shell (SSH) client for encrypted remote connections
{
  imports = [ ./git.nix ];

  config = lib.mkIf config.programs.ssh.enable {
    programs.ssh = {
      package = pkgs.openssh;
      enableDefaultConfig = false;
      extraOptionOverrides = {
        AddKeysToAgent = "yes";
        ForwardAgent = "yes";
        ServerAliveInterval = "60";
        ServerAliveCountMax = "3";
        VisualHostKey = "yes";
        HashKnownHosts = "yes";
      };
    };

    services.ssh-agent = {
      enable = true;
    };
  };
}