This commit is contained in:
2025-12-11 19:36:56 +00:00
parent 125cd86adf
commit b85728470c
55 changed files with 96 additions and 33 deletions

25
modules/ssh.nix Normal file
View File

@@ -0,0 +1,25 @@
{
pkgs,
lib,
user,
...
}: {
programs.ssh = {
enable = true;
enableDefaultConfig = false;
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")
];
};
};
};
}