From b8298618b630ad41244f5394b823a2a21e190ed9 Mon Sep 17 00:00:00 2001 From: moons-14 Date: Thu, 18 Jun 2026 06:57:00 +0900 Subject: [PATCH] fix --- modules/applications/ssh/default.nix | 9 +++++++++ modules/applications/ssh/home.nix | 6 ++++++ 2 files changed, 15 insertions(+) diff --git a/modules/applications/ssh/default.nix b/modules/applications/ssh/default.nix index f3debb2..7e5b87c 100644 --- a/modules/applications/ssh/default.nix +++ b/modules/applications/ssh/default.nix @@ -32,6 +32,15 @@ in default = { }; description = "SSH match blocks"; }; + + githubIdentityFiles = lib.mkOption { + type = lib.types.listOf lib.types.str; + default = [ + "~/.ssh/id_ed25519_sk_rk" + "~/.ssh/id_ed25519" + ]; + description = "SSH identity files for GitHub (tried in order)"; + }; }; config = lib.mkIf cfg.enable { diff --git a/modules/applications/ssh/home.nix b/modules/applications/ssh/home.nix index e0e34b7..ee730fb 100644 --- a/modules/applications/ssh/home.nix +++ b/modules/applications/ssh/home.nix @@ -25,6 +25,12 @@ in enableDefaultConfig = false; settings = cfg.matchBlocks // { + "github.com" = { + IdentityFile = cfg.githubIdentityFiles; + IdentitiesOnly = true; + AddKeysToAgent = cfg.addKeysToAgent; + }; + "*" = { IdentityFile = cfg.defaultIdentityFile; AddKeysToAgent = cfg.addKeysToAgent;