feat: Added ssh config

This commit is contained in:
Patrick Großmann 2023-01-21 23:17:48 +01:00
parent a50249471d
commit 4d70cb6da4
Signed by: patrick
GPG key ID: 451F95EFB8BECD0F
2 changed files with 35 additions and 3 deletions

View file

@ -1,6 +1,3 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{
config,
lib,

View file

@ -30,6 +30,41 @@
}
];
};
home.file.".ssh/1.pub".text = ''
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDZixkix0KfKuq7Q19whS5FQQg51/AJGB5BiNF/7h/LM cardno:15 489 049
'';
home.file.".ssh/2.pub".text = ''
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHxD4GOrwrBTG4/qQhm5hoSB2CP7W9g1LPWP11oLGOjQ cardno:23 010 997
'';
programs.ssh = {
enable = true;
matchBlocks =
let
identityFile = [ "~/.ssh/1" "~/.ssh/2" ];
in
{
"elisabeth" = {
hostname = "lel.lol";
user = "root";
inherit identityFile;
};
"valhalla" = {
hostname = "valhalla.fs.tum.de";
user = "grossmann";
inherit identityFile;
};
"elisabethprivate" = {
hostname = "lel.lol";
user = "patrick";
inherit identityFile;
};
"*" = {
identitiesOnly = true;
};
};
};
programs.neovim = {
enable = true;
viAlias = true;