From 216329ae09563b317b64540fc4f49ec1c5d5f392 Mon Sep 17 00:00:00 2001 From: Seongmin Lee Date: Mon, 20 Oct 2025 22:15:56 +0900 Subject: [PATCH] nix: knot: pass config to `knot guard` Change-Id: rpmokntslpkkznzusqynukvnvnwrumzl this is a temporary fix. ideal solution would be introducing json file configuration or serving ssh server by our own instead of relying on sshd Signed-off-by: Seongmin Lee --- nix/modules/knot.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/nix/modules/knot.nix b/nix/modules/knot.nix index adfdefc6..f20112ce 100644 --- a/nix/modules/knot.nix +++ b/nix/modules/knot.nix @@ -157,6 +157,19 @@ in ''; }; + # TODO: abstract this to share same env table with systemd.services.knot + environment.variables = { + "KNOT_REPO_SCAN_PATH" = cfg.repo.scanPath; + "KNOT_REPO_MAIN_BRANCH" = cfg.repo.mainBranch; + "APPVIEW_ENDPOINT" = cfg.appviewEndpoint; + "KNOT_SERVER_INTERNAL_LISTEN_ADDR" = cfg.server.internalListenAddr; + "KNOT_SERVER_LISTEN_ADDR" = cfg.server.listenAddr; + "KNOT_SERVER_DB_PATH" = cfg.server.dbPath; + "KNOT_SERVER_HOSTNAME" = cfg.server.hostname; + "KNOT_SERVER_PLC_URL" = cfg.server.plcUrl; + "KNOT_SERVER_JETSTREAM_ENDPOINT" = cfg.server.jetstreamEndpoint; + "KNOT_SERVER_OWNER" = cfg.server.owner; + }; environment.etc."ssh/keyfetch_wrapper" = { mode = "0555"; text = '' -- 2.43.0