nix: add plcUrl options for services.{knot,spindle} #771

closed
opened by boltless.me targeting master from sandboxed-atmosphere
Changed files
+22 -1
nix
+14
nix/modules/knot.nix
···
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;
···
"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";
+8 -1
nix/modules/spindle.nix
···
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";
···
"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}"