summary refs log tree commit diff
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2025-12-27 02:34:30 +0100
committerRory& <root@rory.gay>2025-12-27 02:34:30 +0100
commitd49fd3922fbf10123861a4a0e3dd20fdc9af0cd0 (patch)
treee8c840ba448cdf1c7c2d94f270197f5e36d35d68
parentnix: fix env name (diff)
downloadserver-ts-d49fd3922fbf10123861a4a0e3dd20fdc9af0cd0.tar.xz
Server name setting
-rw-r--r--nix/modules/default/default.nix11
1 files changed, 9 insertions, 2 deletions
diff --git a/nix/modules/default/default.nix b/nix/modules/default/default.nix

index cee3c65a..d3b74ac9 100644 --- a/nix/modules/default/default.nix +++ b/nix/modules/default/default.nix
@@ -22,6 +22,9 @@ let gateway = { endpointPublic = "ws${if cfg.gatewayEndpoint.useSsl then "s" else ""}://${cfg.gatewayEndpoint.host}:${toString cfg.gatewayEndpoint.publicPort}/"; }; + general = { + serverName = cfg.serverName; + }; } cfg.settings ); in @@ -56,18 +59,22 @@ in }; in { - enable = lib.mkEnableOption "spacebar server"; + enable = lib.mkEnableOption "Spacebar server"; package = lib.mkPackageOption self.packages.${pkgs.stdenv.hostPlatform.system} "spacebar-server" { default = "default"; }; databaseFile = lib.mkOption { type = lib.types.nullOr lib.types.path; default = null; description = '' Path to a file containing a definition of the `DATABASE` environment variable database connection string. - Example content: `DATABASE=postgres//username:password@host-IP:port/databaseName`. + Example content: `DATABASE=postgres://username:password@host-IP:port/databaseName`. See https://docs.spacebar.chat/setup/server/database/. ''; }; + serverName = lib.mkOption { + type = lib.types.str; + description = "The server name for this Spacebar instance (aka. common name, usually the domain where your well known is hosted)."; + }; apiEndpoint = mkEndpointOptions "api.sb.localhost" 3001; gatewayEndpoint = mkEndpointOptions "gateway.sb.localhost" 3003; cdnEndpoint = mkEndpointOptions "cdn.sb.localhost" 3003;