create homeManagerModules.private for ssh hosts
This commit is contained in:
@@ -56,6 +56,12 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
homeManagerModules.private = { ... }: {
|
||||||
|
imports = [
|
||||||
|
./home/private/ssh-hosts.nix
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
homeManagerModules.macos = { ... }: {
|
homeManagerModules.macos = { ... }: {
|
||||||
imports = [
|
imports = [
|
||||||
./home/macos/home.nix
|
./home/macos/home.nix
|
||||||
|
|||||||
50
home/private/ssh-hosts.nix
Normal file
50
home/private/ssh-hosts.nix
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
programs.ssh = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
matchBlocks = let
|
||||||
|
tb1 = "~/.ssh/id_rsa.tb1.pub";
|
||||||
|
tb2 = "~/.ssh/id_rsa.tb2.pub";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
# HomeLab Machines
|
||||||
|
"fs1" = {
|
||||||
|
hostname = "fs1.t1.xyz";
|
||||||
|
identityFile = tb1;
|
||||||
|
};
|
||||||
|
"fs1.local" = {
|
||||||
|
hostname = "192.168.50.100";
|
||||||
|
identityFile = tb1;
|
||||||
|
};
|
||||||
|
|
||||||
|
"tr1" = {
|
||||||
|
hostname = "tr1.t1.xyz";
|
||||||
|
identityFile = tb1;
|
||||||
|
};
|
||||||
|
"tr1.local" = {
|
||||||
|
hostname = "192.168.50.101";
|
||||||
|
identityFile = tb1;
|
||||||
|
};
|
||||||
|
|
||||||
|
"wg1" = {
|
||||||
|
hostname = "192.168.50.101";
|
||||||
|
identityFile = tb1;
|
||||||
|
};
|
||||||
|
"wg1.local" = {
|
||||||
|
hostname = "192.168.50.101";
|
||||||
|
identityFile = tb1;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Cloud Machines
|
||||||
|
"t1" = {
|
||||||
|
hostname = "95.216.215.4";
|
||||||
|
identityFile = tb1;
|
||||||
|
};
|
||||||
|
"oc1" = {
|
||||||
|
hostname = "64.181.254.177";
|
||||||
|
identityFile = tb1;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user