From c1f47b02b718ef526ea29c0a65e0a975df2473b0 Mon Sep 17 00:00:00 2001 From: Timo Bingmann Date: Tue, 4 Nov 2025 22:28:28 -0800 Subject: [PATCH] create homeManagerModules.private for ssh hosts --- flake.nix | 6 ++++++ home/private/ssh-hosts.nix | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 home/private/ssh-hosts.nix diff --git a/flake.nix b/flake.nix index 0cbc38f..a69919e 100644 --- a/flake.nix +++ b/flake.nix @@ -56,6 +56,12 @@ ]; }; + homeManagerModules.private = { ... }: { + imports = [ + ./home/private/ssh-hosts.nix + ]; + }; + homeManagerModules.macos = { ... }: { imports = [ ./home/macos/home.nix diff --git a/home/private/ssh-hosts.nix b/home/private/ssh-hosts.nix new file mode 100644 index 0000000..bc69b18 --- /dev/null +++ b/home/private/ssh-hosts.nix @@ -0,0 +1,32 @@ +{ ... }: +{ + 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.100" + identityFile = tb1; + }; + }; + }; +}