From bcb11db5abf8642fd3fe06e7a81b5d2956e8f0a8 Mon Sep 17 00:00:00 2001 From: Seongmin Lee Date: Mon, 20 Oct 2025 22:11:02 +0900 Subject: [PATCH] nix: add `plcUrl` options for `services.{knot,spindle}` Change-Id: xotkxkoxxnlwtwykuxpyqsrrukxutuwo Signed-off-by: Seongmin Lee --- nix/modules/knot.nix | 14 ++++++++++++++ nix/modules/spindle.nix | 9 ++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/nix/modules/knot.nix b/nix/modules/knot.nix index dabbd396..adfdefc6 100644 --- a/nix/modules/knot.nix +++ b/nix/modules/knot.nix @@ -111,6 +111,18 @@ in description = "Hostname for the server (required)"; }; + plcUrl = mkOption { + type = types.str; + default = "https://plc.directory"; + description = "atproto PLC directory"; + }; + + jetstreamEndpoint = mkOption { + type = types.str; + default = "wss://jetstream1.us-west.bsky.network/subscribe"; + description = "Jetstream endpoint to subscribe to"; + }; + dev = mkOption { type = types.bool; default = false; @@ -199,6 +211,8 @@ in "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}" ]; ExecStart = "${cfg.package}/bin/knot server"; diff --git a/nix/modules/spindle.nix b/nix/modules/spindle.nix index bb43dd04..09efc51f 100644 --- a/nix/modules/spindle.nix +++ b/nix/modules/spindle.nix @@ -37,6 +37,12 @@ in description = "Hostname for the server (required)"; }; + plcUrl = mkOption { + type = types.str; + default = "https://plc.directory"; + description = "atproto PLC directory"; + }; + jetstreamEndpoint = mkOption { type = types.str; default = "wss://jetstream1.us-west.bsky.network/subscribe"; @@ -119,7 +125,8 @@ in "SPINDLE_SERVER_LISTEN_ADDR=${cfg.server.listenAddr}" "SPINDLE_SERVER_DB_PATH=${cfg.server.dbPath}" "SPINDLE_SERVER_HOSTNAME=${cfg.server.hostname}" - "SPINDLE_SERVER_JETSTREAM=${cfg.server.jetstreamEndpoint}" + "SPINDLE_SERVER_PLC_URL=${cfg.server.plcUrl}" + "SPINDLE_SERVER_JETSTREAM_ENDPOINT=${cfg.server.jetstreamEndpoint}" "SPINDLE_SERVER_DEV=${lib.boolToString cfg.server.dev}" "SPINDLE_SERVER_OWNER=${cfg.server.owner}" "SPINDLE_SERVER_MAX_JOB_COUNT=${toString cfg.server.maxJobCount}" -- 2.43.0