Files
cyper-nix/home/ssh.nix
T
2026-05-15 15:23:26 +02:00

30 lines
804 B
Nix

{ primaryUser, isDarwin, ... }:
{
programs.ssh = {
enable = true;
enableDefaultConfig = false;
matchBlocks = {
"*" = {
addKeysToAgent = "yes";
};
"*.cyperpunk.de" = {
identityFile =
if isDarwin then "/Users/${primaryUser}/.ssh/ssh" else "/home/${primaryUser}/.ssh/ssh";
user = primaryUser;
};
"github.com" = {
identityFile =
if isDarwin then "/Users/${primaryUser}/.ssh/github" else "/home/${primaryUser}/.ssh/github";
user = "git";
};
"git.cyperpunk.de" = {
hostname = "git.cyperpunk.de";
port = 12222;
user = "gitea";
identityFile =
if isDarwin then "/Users/${primaryUser}/.ssh/ssh" else "/home/${primaryUser}/.ssh/ssh";
};
};
};
}