diff --git a/nix/modules/knot.nix b/nix/modules/knot.nix --- a/nix/modules/knot.nix +++ b/nix/modules/knot.nix @@ -111,6 +111,18 @@ 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 @@ "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 --- a/nix/modules/spindle.nix +++ b/nix/modules/spindle.nix @@ -37,6 +37,12 @@ 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 @@ "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}"