ssh client config

This commit is contained in:
Leon Wilzer 2024-06-21 20:15:22 +02:00
parent ea2bd9171d
commit 9dcf078a58

View File

@ -1,10 +1,13 @@
{ config, pkgs, ... }:
let
homeDir = "/home/leon";
in
{
# Home Manager needs a bit of information about you and the
# paths it should manage.
home.username = "leon";
home.homeDirectory = "/home/leon";
home.homeDirectory = homeDir;
# Packages that should be installed to the user profile.
@ -30,6 +33,28 @@
};
};
programs.ssh =
let
sshDir = "${homeDir}/.ssh";
in
{
enable = true;
matchBlocks = {
"libre.moe *.libre.moe" = {
user = "leon";
identityFile = "${sshDir}/libremoe";
};
"komu.boo *.komu.boo" = {
user = "leon";
identityFile = "${sshDir}/komuboo";
};
"uni-paderborn.de upb.de *.uni-paderborn.de *.upb.de" = {
user = "lwilzer";
identityFile = "${sshDir}/unipaderborn";
};
};
};
# This value determines the Home Manager release that your
# configuration is compatible with. This helps avoid breakage
# when a new Home Manager release introduces backwards