diff --git a/config/default.nix b/config/default.nix index f630c52..8bbd725 100644 --- a/config/default.nix +++ b/config/default.nix @@ -4,5 +4,6 @@ ./bash.nix ./git.nix ./starship.nix + ./ssh.nix ]; } diff --git a/config/ssh.nix b/config/ssh.nix new file mode 100644 index 0000000..92a7d81 --- /dev/null +++ b/config/ssh.nix @@ -0,0 +1,20 @@ +{ ... }: + +{ + programs.ssh = { + enable = true; + compression = true; + serverAliveInterval = 60; + serverAliveCountMax = 3; + + # SSH Multiplexing - reuses existing SSH connections for multiple sessions, reducing authentication overhead and improving speed for subsequent logins. + controlPath = "~/.ssh/master-%r@%n:%p"; + controlMaster = "auto"; + controlPersist = "600"; + + # Include custom configs from 1Password (See packages/common/secrets.nix) + includes = [ + "~/.ssh/config.d/*.conf" + ]; + }; +} diff --git a/flake.lock b/flake.lock index 87d539a..bd805b0 100644 --- a/flake.lock +++ b/flake.lock @@ -41,11 +41,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1758346548, - "narHash": "sha256-afXE7AJ7MY6wY1pg/Y6UPHNYPy5GtUKeBkrZZ/gC71E=", + "lastModified": 1758589230, + "narHash": "sha256-zMTCFGe8aVGTEr2RqUi/QzC1nOIQ0N1HRsbqB4f646k=", "owner": "nixos", "repo": "nixpkgs", - "rev": "b2a3852bd078e68dd2b3dfa8c00c67af1f0a7d20", + "rev": "d1d883129b193f0b495d75c148c2c3a7d95789a0", "type": "github" }, "original": {