broke out ssh module

This commit is contained in:
John Lancaster
2025-07-02 22:56:10 -05:00
parent 97b2e05f80
commit c1a9e401cb
3 changed files with 37 additions and 72 deletions

View File

@@ -0,0 +1,32 @@
{ config, lib, ... }:
{
programs.ssh = lib.mkIf config.ssh {
enable = true;
extraConfig = ''
SetEnv TERM="xterm-256color"
${lib.optionalString config._1password "IdentityAgent ~/.1password/agent.sock"}
'';
matchBlocks = lib.mkMerge [
(lib.mkIf (config.profile == "personal") {
"panoptes" = {
hostname = "192.168.1.107";
user = "panoptes";
};
"pve5070" = {
hostname = "192.168.1.130";
user = "root";
};
"nix-test" = {
hostname = "192.168.1.36";
user = "john";
};
})
(lib.mkIf (config.profile == "work") {
"ubuntu-nvidia" = {
hostname = "10.118.46.120";
user = "john";
};
})
];
};
}