Moved per-host ssh config from using /etc/hosts to actually using ssh config lol.

This commit is contained in:
vorboyvo 2024-05-08 12:54:24 -04:00
parent 695972bf92
commit cbdc06c9fb
3 changed files with 17 additions and 7 deletions

View file

@ -36,13 +36,6 @@
networking.networkmanager.enable =
true; # Easiest to use and most distros use this by default.
# Extra hosts for connecting to tailscale'd servers
networking.extraHosts = ''
100.89.185.72 raymond
100.119.100.64 sherbrooke
168.138.90.29 souligny
'';
networking.firewall =
let kdeConnectPorts = {
from = 1714;

View file

@ -7,6 +7,7 @@ let
in {
imports = [
./programs/kdeconnect.nix
./programs/ssh.nix
];
home.username = "alice";
home.homeDirectory = "/home/alice";

16
programs/ssh.nix Normal file
View file

@ -0,0 +1,16 @@
{
programs.ssh = {
enable = true;
matchBlocks = {
"sherbrooke" = {
hostname = "100.119.100.64";
user = "vorboyvo";
};
"souligny" = {
hostname = "100.89.207.70";
user = "ubuntu";
identityFile = "~/.ssh/ssh-key-2024-04-12.key"; # supply this manually
};
};
};
}