This commit is contained in:
2025-08-16 14:46:16 +02:00
parent 8d4ea15585
commit 88bcacf521
33 changed files with 53 additions and 41 deletions

23
modules/home/ssh.nix Normal file
View File

@@ -0,0 +1,23 @@
{
pkgs,
lib,
user,
...
}: {
programs.ssh = {
enable = true;
includes = [
(lib.mkIf pkgs.stdenv.hostPlatform.isLinux "/home/${user}/.ssh/config_external")
(lib.mkIf pkgs.stdenv.hostPlatform.isDarwin "/Users/${user}/.ssh/config_external")
];
matchBlocks = {
"github.com" = {
identitiesOnly = true;
identityFile = [
(lib.mkIf pkgs.stdenv.hostPlatform.isLinux "/home/${user}/.ssh/id_ed25519")
(lib.mkIf pkgs.stdenv.hostPlatform.isDarwin "/Users/${user}/.ssh/id_ed25519")
];
};
};
};
}