mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-17 15:51:23 +01:00
add conduit compat mode
This makes it possible to deploy Grapevine while using a database originally created by Conduit, including leaving the admin bot user's localpart the same as before.
This commit is contained in:
parent
33e7a46b53
commit
a25f2ec950
6 changed files with 104 additions and 22 deletions
|
|
@ -45,6 +45,13 @@ in
|
|||
'';
|
||||
default = "::1";
|
||||
};
|
||||
global.conduit_compat = lib.mkOption {
|
||||
type = types.bool;
|
||||
description = ''
|
||||
Whether to operate as a drop-in replacement for Conduit.
|
||||
'';
|
||||
default = false;
|
||||
};
|
||||
global.database_path = lib.mkOption {
|
||||
type = types.nonEmptyStr;
|
||||
readOnly = true;
|
||||
|
|
@ -54,7 +61,9 @@ in
|
|||
Note that this is read-only because this module makes use of
|
||||
systemd's `StateDirectory` option.
|
||||
'';
|
||||
default = "/var/lib/grapevine";
|
||||
default = if cfg.settings.global.conduit_compat
|
||||
then "/var/lib/matrix-conduit"
|
||||
else "/var/lib/grapevine";
|
||||
};
|
||||
global.port = lib.mkOption {
|
||||
type = types.port;
|
||||
|
|
@ -104,12 +113,16 @@ in
|
|||
RestrictNamespaces = true;
|
||||
RestrictRealtime = true;
|
||||
StartLimitBurst = 5;
|
||||
StateDirectory = "grapevine";
|
||||
StateDirectory = if cfg.settings.global.conduit_compat
|
||||
then "matrix-conduit"
|
||||
else "grapevine";
|
||||
StateDirectoryMode = "0700";
|
||||
SystemCallArchitectures = "native";
|
||||
SystemCallFilter = [ "@system-service" "~@privileged" ];
|
||||
UMask = "077";
|
||||
User = "grapevine";
|
||||
User = if cfg.settings.global.conduit_compat
|
||||
then "conduit"
|
||||
else "grapevine";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue