From cb961051f8307a0bfd6e75acb52a7b7ac003e4d0 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Sun, 2 Nov 2025 13:06:05 -0800 Subject: simplify configuration for darwin --- home/profiles/ssh.nix | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 home/profiles/ssh.nix (limited to 'home/profiles/ssh.nix') diff --git a/home/profiles/ssh.nix b/home/profiles/ssh.nix new file mode 100644 index 0000000..250aff5 --- /dev/null +++ b/home/profiles/ssh.nix @@ -0,0 +1,29 @@ +{ config, ... }: +{ + programs.ssh = { + enable = true; + forwardAgent = true; + serverAliveInterval = 60; + controlMaster = "auto"; + controlPersist = "30m"; + controlPath = "${config.home.homeDirectory}/.ssh/sockets/S.%r@%h:%p"; + + matchBlocks = { + "github.com" = { + hostname = "github.com"; + user = "git"; + forwardAgent = false; + extraOptions = { + preferredAuthentications = "publickey"; + controlMaster = "no"; + controlPath = "none"; + }; + }; + }; + }; + + home.file = { + # we need this path to be created so that the control path can be used. + ".ssh/sockets/.keep".text = "# Managed by Home Manager"; + }; +} -- cgit v1.2.3