mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-17 15:51:23 +01:00
drop nested config
This functionality was never actually used AFAICT, as no way to provide alternate profiles was ever provided. This changes the configuration format to remove the `[global]` section, everything that was previously under that namespace is now at the top level.
This commit is contained in:
parent
44088852cf
commit
003c0a4928
3 changed files with 10 additions and 11 deletions
|
|
@ -29,21 +29,21 @@ in
|
|||
type = types.submodule {
|
||||
freeformType = format.type;
|
||||
options = {
|
||||
global.address = lib.mkOption {
|
||||
address = lib.mkOption {
|
||||
type = types.nonEmptyStr;
|
||||
description = ''
|
||||
The local IP address to bind to.
|
||||
'';
|
||||
default = "::1";
|
||||
};
|
||||
global.conduit_compat = lib.mkOption {
|
||||
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 {
|
||||
database_path = lib.mkOption {
|
||||
type = types.nonEmptyStr;
|
||||
readOnly = true;
|
||||
description = ''
|
||||
|
|
@ -52,11 +52,11 @@ in
|
|||
Note that this is read-only because this module makes use of
|
||||
systemd's `StateDirectory` option.
|
||||
'';
|
||||
default = if cfg.settings.global.conduit_compat
|
||||
default = if cfg.settings.conduit_compat
|
||||
then "/var/lib/matrix-conduit"
|
||||
else "/var/lib/grapevine";
|
||||
};
|
||||
global.port = lib.mkOption {
|
||||
port = lib.mkOption {
|
||||
type = types.port;
|
||||
description = ''
|
||||
The local port to bind to.
|
||||
|
|
@ -98,14 +98,14 @@ in
|
|||
RestrictNamespaces = true;
|
||||
RestrictRealtime = true;
|
||||
StartLimitBurst = 5;
|
||||
StateDirectory = if cfg.settings.global.conduit_compat
|
||||
StateDirectory = if cfg.settings.conduit_compat
|
||||
then "matrix-conduit"
|
||||
else "grapevine";
|
||||
StateDirectoryMode = "0700";
|
||||
SystemCallArchitectures = "native";
|
||||
SystemCallFilter = [ "@system-service" "~@privileged" ];
|
||||
UMask = "077";
|
||||
User = if cfg.settings.global.conduit_compat
|
||||
User = if cfg.settings.conduit_compat
|
||||
then "conduit"
|
||||
else "grapevine";
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue