summary refs log tree commit diff
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2026-05-16 21:25:24 +0200
committerRory& <root@rory.gay>2026-05-24 06:14:39 +0200
commit94955754df665f18cb09c3bd33337bad16a02981 (patch)
tree3e3c260c84a65f5b275dae1092ba19c8b0f023cd
parentDemote default rabbitmq behavior, implement init for all BaseEventWriter/List... (diff)
downloadserver-ts-94955754df665f18cb09c3bd33337bad16a02981.tar.xz
Nix: expose EVENT_TRANSMISSION as an option
-rw-r--r--nix/modules/default/default.nix20
1 files changed, 17 insertions, 3 deletions
diff --git a/nix/modules/default/default.nix b/nix/modules/default/default.nix

index 5602c258..876ad941 100644 --- a/nix/modules/default/default.nix +++ b/nix/modules/default/default.nix
@@ -55,6 +55,20 @@ in description = "Path to store CDN files."; }; + ipcMethod = lib.mkOption { + type = lib.types.enum [ + "unix" + "rabbitmq-single" + "rabbitmq-legacy" + ]; + default = "unix"; + description = '' + How messages should be passed between services. + Note that the C# services (eg. Admin API) currently only supports the "unix" method! + Read more at https://docs.spacebar.chat/setup/server/installation/generic/ipc/. + ''; + }; + extraEnvironment = lib.mkOption { default = { }; description = '' @@ -98,7 +112,6 @@ in environment = builtins.mapAttrs (_: val: builtins.toString val) ( { # things we set by default... - EVENT_TRANSMISSION = "unix"; EVENT_SOCKET_PATH = "/run/spacebar/"; } // cfg.extraEnvironment @@ -108,6 +121,7 @@ in CONFIG_READONLY = 1; PORT = toString cfg.apiEndpoint.localPort; STORAGE_LOCATION = cfg.cdnPath; + EVENT_TRANSMISSION = cfg.ipcMethod; } ); serviceConfig = { @@ -121,7 +135,6 @@ in environment = builtins.mapAttrs (_: val: builtins.toString val) ( { # things we set by default... - EVENT_TRANSMISSION = "unix"; EVENT_SOCKET_PATH = "/run/spacebar/"; } // cfg.extraEnvironment @@ -131,6 +144,7 @@ in CONFIG_READONLY = 1; PORT = toString cfg.gatewayEndpoint.localPort; STORAGE_LOCATION = cfg.cdnPath; + EVENT_TRANSMISSION = cfg.ipcMethod; APPLY_DB_MIGRATIONS = "false"; } ); @@ -144,7 +158,6 @@ in environment = builtins.mapAttrs (_: val: builtins.toString val) ( { # things we set by default... - EVENT_TRANSMISSION = "unix"; EVENT_SOCKET_PATH = "/run/spacebar/"; } // cfg.extraEnvironment @@ -154,6 +167,7 @@ in CONFIG_READONLY = 1; PORT = toString cfg.cdnEndpoint.localPort; STORAGE_LOCATION = cfg.cdnPath; + EVENT_TRANSMISSION = cfg.ipcMethod; APPLY_DB_MIGRATIONS = "false"; } );