ssh: home network option for ssh

main
Zynh Ludwig 2024-07-11 05:13:00 -07:00
parent 344f34c061
commit 02067516a8
1 changed files with 3 additions and 1 deletions

View File

@ -6,6 +6,8 @@ in
{ {
options.snowhawk.ssh = { options.snowhawk.ssh = {
enable = lib.mkEnableOption "ssh"; enable = lib.mkEnableOption "ssh";
homeNetwork = lib.mkEnableOption "include local hostnames for home network devices";
}; };
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
@ -23,7 +25,7 @@ in
user = "zynh"; user = "zynh";
identityFile = "${config.home.homeDirectory}/.ssh/msiserver"; identityFile = "${config.home.homeDirectory}/.ssh/msiserver";
}; };
"msiserver.local" = { "msiserver.local" = lib.mkIf cfg.homeNetwork {
hostname = "msiserver"; hostname = "msiserver";
user = "zynh"; user = "zynh";
identityFile = "${config.home.homeDirectory}/.ssh/msiserver"; identityFile = "${config.home.homeDirectory}/.ssh/msiserver";