mirror of
https://github.com/spacebarchat/server.git
synced 2026-05-11 03:57:06 +00:00
29 lines
774 B
Nix
29 lines
774 B
Nix
{ lib }:
|
|
{
|
|
mkEndpointOption =
|
|
defaultHost: defaultPort:
|
|
lib.mkOption {
|
|
type = lib.types.submodule {
|
|
options = {
|
|
useSsl = lib.mkEnableOption "Use SSL for this endpoint.";
|
|
host = lib.mkOption {
|
|
type = lib.types.str;
|
|
default = defaultHost;
|
|
description = "Host to bind to.";
|
|
};
|
|
localPort = lib.mkOption {
|
|
type = lib.types.port;
|
|
default = defaultPort;
|
|
description = "Port to bind to.";
|
|
};
|
|
publicPort = lib.mkOption {
|
|
type = lib.types.port;
|
|
default = 443;
|
|
description = "Public port to use in .well-known, defaults to 443.";
|
|
};
|
|
};
|
|
};
|
|
default = { };
|
|
};
|
|
}
|