From 818e023ddd23df737139574d0fd86c6611d94d1b Mon Sep 17 00:00:00 2001 From: Daniel Langbein Date: Wed, 27 Sep 2023 20:12:19 +0200 Subject: [PATCH] ssh config --- assets/ssh/pi3bplus.pub | 1 + modules/ssh-server.nix | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 assets/ssh/pi3bplus.pub diff --git a/assets/ssh/pi3bplus.pub b/assets/ssh/pi3bplus.pub new file mode 100644 index 0000000..785fb75 --- /dev/null +++ b/assets/ssh/pi3bplus.pub @@ -0,0 +1 @@ +ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJi1BMzoSM0msvtKwoOzySYuKTpFCAanHYWQjL0tZhDI root@odroid diff --git a/modules/ssh-server.nix b/modules/ssh-server.nix index 87ea7ad..9522412 100644 --- a/modules/ssh-server.nix +++ b/modules/ssh-server.nix @@ -26,5 +26,9 @@ ]; users.users.root.openssh.authorizedKeys.keys = [ (builtins.readFile ../assets/ssh/nitrokey.pub) - ]; + ] ++ ( + if (config.networking.hostName == "yodaNas") + then [(builtins.readFile ../assets/ssh/pi3bplus.pub)] + else [] + ); }