feat(home:ssh): add github to ssh knownhosts

This commit is contained in:
ooks-io 2024-06-24 14:14:52 +12:00
parent ea5054789d
commit f0bd3f97af
4 changed files with 16 additions and 8 deletions

View file

@ -3,20 +3,21 @@
let
inherit (lib) mkIf;
cfg = config.ooknet.tools.ssh;
admin = osConfig.ooknet.host.admin;
in
{
config = mkIf cfg.enable {
programs.ssh = {
enable = true;
extraConfig = /* config */''
Host *
IdentityAgent "~/.1password/agent.sock"
'';
compression = true;
hashKnownHosts = true;
matchBlocks = {
"github.com" = {
user = "git";
hostname = "github.com";
identityFile = "${osConfig.age.secrets.github_key.path}";
};
};
};
programs.fish.interactiveShellInit = mkIf (admin.shell == "fish") /* fish */ ''
set -gx SSH_AUTH_SOCK ~/.1password/agent.sock
'';
};
}