summaryrefslogtreecommitdiffstats
path: root/tv/2configs/ssh.nix
blob: 84d24736276d1952ec2d8e698491e53a0b58e74d (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
{ config, pkgs, ... }:

with import <stockholm/lib>;

{
  # Override NixOS's "Allow DSA keys for now."
  environment.etc."ssh/ssh_config".text = mkForce ''
    AddressFamily ${if config.networking.enableIPv6 then "any" else "inet"}

    ${optionalString config.programs.ssh.setXAuthLocation ''
      XAuthLocation ${pkgs.xorg.xauth}/bin/xauth
    ''}

    ForwardX11 ${if config.programs.ssh.forwardX11 then "yes" else "no"}

    ${config.programs.ssh.extraConfig}
  '';

  programs.ssh = {
    extraConfig = ''
      UseRoaming no
    '';
    startAgent = false;
  };
}