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-26 07:47:36 +0200
commit92c07ba4458474a5a15ec414df12b48a685979bb (patch)
treebdaba30a37e40abba6d4ea36678ed090f1c8d649
parentDemote default rabbitmq behavior, implement init for all BaseEventWriter/List... (diff)
downloadserver-ts-92c07ba4458474a5a15ec414df12b48a685979bb.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"; } );