Files
nixos/OLD CONFIGS/nix_new/modules/home-manager/dev/ssh-client.nix
T
2026-02-22 19:25:39 +01:00

32 lines
761 B
Nix

{ config, lib, pkgs, ... }:
let
confDir = "${config.home.homeDirectory}/nixos/files/conf/ssh";
sshClientConf = "${confDir}/ssh-client.conf";
in
{
programs.ssh = {
enable = true;
enableDefaultConfig = false;
matchBlocks."*" = {
addKeysToAgent = "yes";
serverAliveInterval = 30;
serverAliveCountMax = 3;
};
# Load your extra SSH config from a file in ~/nixos/files/conf/ssh/
extraConfig = ''
Include ${config.home.homeDirectory}/nixos/files/conf/ssh/ssh-client.conf
'';
};
# Home Manager's ssh-agent (NOT programs.ssh.startAgent; that's NixOS)
services.ssh-agent = {
enable = true;
# Optional: if you use zsh, this helps export SSH_AUTH_SOCK in your shell
enableZshIntegration = true;
};
}