feat(ssh): Using SSH over the HTTPS port for GitHub, refactor ssh config (#187)

This commit is contained in:
Ryan Yin
2025-05-16 00:24:46 +08:00
committed by GitHub
parent 43721fba8a
commit b44d277072
12 changed files with 91 additions and 120 deletions
+4 -11
View File
@@ -1,4 +1,6 @@
{
{config, ...}: let
hostName = "ai"; # Define your hostname.
in {
modules.desktop = {
hyprland = {
nvidia = true;
@@ -13,14 +15,5 @@
};
};
programs.ssh = {
enable = true;
extraConfig = ''
Host github.com
IdentityFile ~/.ssh/idols-ai
# Specifies that ssh should only use the identity file explicitly configured above
# required to prevent sending default identity files first.
IdentitiesOnly yes
'';
};
programs.ssh.matchBlocks."github.com".identityFile = "${config.home.homeDirectory}/.ssh/${hostName}";
}