aboutsummaryrefslogtreecommitdiffstats
path: root/modules/security/ssh/default.nix
blob: ff684b4605c51dbe1b32dbe333ca4d047d1ced88 (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
# OpenSSH - Secure shell (SSH) client for encrypted remote connections
{
  config,
  lib,
  pkgs,
  ...
}:
{
  imports = [ ./git.nix ];

  options.security.ssh = {
    enable = lib.mkEnableOption "Enables ssh.";
  };

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