home/common/ssh.nix (view raw)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
{ lib, ... }:
{
programs.ssh.enableDefaultConfig = false;
programs.keychain = {
enable = true;
keys = [ "primary-vi" ];
enableFishIntegration = true;
};
home.activation.writeSSHConfig = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
rm -f $HOME/.ssh/config
cat > $HOME/.ssh/config <<EOF
Host tangled-handle
IdentitiesOnly yes
User git
HostName tangled.sh
IdentityFile ~/.ssh/id_ed25519_handle
Host tangled.sh
IdentitiesOnly yes
User git
HostName tangled.sh
IdentityFile ~/.ssh/id_ed25519
EOF
chmod 600 $HOME/.ssh/config
'';
}
|