mirror of
https://github.com/spacebarchat/server.git
synced 2026-07-02 22:12:02 +00:00
Nix: expose EVENT_TRANSMISSION as an option
This commit is contained in:
@@ -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";
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user