From 0b7b8502650e7877098e53410a2d76bd879c301d Mon Sep 17 00:00:00 2001 From: Kiara Grouwstra Date: Tue, 1 Apr 2025 13:31:59 +0200 Subject: [PATCH] allow accessing test vms from fedi201's machine ssh key, closes #286 --- infra/flake-part.nix | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/infra/flake-part.nix b/infra/flake-part.nix index f90bd2ff..56b77e08 100644 --- a/infra/flake-part.nix +++ b/infra/flake-part.nix @@ -22,10 +22,26 @@ let { vmName, isTestVm }: { _module.args = { inherit inputs; }; - imports = [ - ./common/resource.nix - (if isTestVm then ./test-machines + "/${vmName}" else ./machines + "/${vmName}") - ]; + imports = + [ + ./common/resource.nix + ] + ++ ( + if isTestVm then + [ + ./test-machines/${vmName} + { + users.users.root.openssh.authorizedKeys.keys = [ + # allow our panel vm access to the test machines + (import ../../keys).systems.fedi201 + ]; + } + ] + else + [ + ./machines/${vmName} + ] + ); fediversityVm.name = vmName; };