Skip to content

Commit 6b38cfa

Browse files
author
glyph
committed
incorporate nixos module feedback
1 parent 9ebb3fc commit 6b38cfa

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

docs/setup/server/installation/nixos.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
!!! warn "The NixOS module is still in development and subject to change."
44

5+
!!! warn "It is not currently possible to use the NixOS module outside flakes-based setups"
6+
57
{{ project.name }} comes with an integrated NixOS module, which takes care of a lot of the configuration for you. In particular, the module automatically configures [seperate SystemD services](../systemd.md) for the API, gateway, and CDN services and configures unix sockets for [message passing](../message-passing).
68

79
## Installation
@@ -29,7 +31,7 @@ imports = [
2931

3032
The module expose the option `services.spacebarchat-server`. You will want to set `serverName` to your instance domain. Additionally, you should point `requestSignaturePath` and `cdnSignaturePath` as files containing secrets for signing requests.
3133

32-
The options `{api,gateway,cdn}Endpoint` should be configured for the connection information of the services, for example:
34+
The options `{api,gateway,cdn}Endpoint` should be configured for the connection information of the services. This can be done manually or by importing `${spacebar}/nix/modules/default/lib.nix` and using the function `mkEndpoint`. For example:
3335

3436
```nix
3537
apiEndpoint = {
@@ -38,6 +40,8 @@ apiEndpoint = {
3840
localPort = 3001;
3941
publicPort = 443; # by default, if useSsl = true
4042
}
43+
44+
gatewayEndpoint = (import "${spacebar}/nix/modules/default/lib.nix").mkEndpoint "gateway.spacebar.mydomain.net" 3002 true;
4145
```
4246

4347
Nginx can be configured to act as a reverse proxy for those endpoints via `nginx.enable`.

0 commit comments

Comments
 (0)