From 3a21601778d950cafa6d7ce34c508d128ee1506d Mon Sep 17 00:00:00 2001 From: Ryan Yin Date: Sun, 31 Aug 2025 13:08:57 +0800 Subject: [PATCH] feat: ssh - `programs.ssh` default values will be removed in the future --- home/base/tui/ssh.nix | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/home/base/tui/ssh.nix b/home/base/tui/ssh.nix index 4ae0d189..af2e7091 100644 --- a/home/base/tui/ssh.nix +++ b/home/base/tui/ssh.nix @@ -9,8 +9,21 @@ programs.ssh = { enable = true; - # "a private key that is used during authentication will be added to ssh-agent if it is running" - addKeysToAgent = "yes"; + # default config + enableDefaultConfig = false; + matchBlocks."*" = { + forwardAgent = false; + # "a private key that is used during authentication will be added to ssh-agent if it is running" + addKeysToAgent = "yes"; + compression = true; + serverAliveInterval = 0; + serverAliveCountMax = 3; + hashKnownHosts = false; + userKnownHostsFile = "~/.ssh/known_hosts"; + controlMaster = "no"; + controlPath = "~/.ssh/master-%r@%n:%p"; + controlPersist = "no"; + }; matchBlocks = { "github.com" = {