mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-04-14 10:17:46 +00:00
nixos/synapse: add option to configure redis automatically
This commit is contained in:
parent
b7c41da8d6
commit
b329180128
@ -770,6 +770,14 @@ in {
|
||||
NixOps is in use.
|
||||
'';
|
||||
};
|
||||
|
||||
configureRedisLocally = lib.mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = lib.mdDoc ''
|
||||
Whether to automatically configure a local redis server for matrix-synapse.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@ -794,6 +802,11 @@ in {
|
||||
}
|
||||
];
|
||||
|
||||
services.matrix-synapse.settings.redis = lib.mkIf cfg.configureRedisLocally {
|
||||
enabled = true;
|
||||
path = config.services.redis.servers.matrix-synapse.unixSocket;
|
||||
};
|
||||
|
||||
services.matrix-synapse.configFile = configFile;
|
||||
services.matrix-synapse.package = wrapped;
|
||||
|
||||
@ -886,6 +899,11 @@ in {
|
||||
];
|
||||
};
|
||||
|
||||
services.redis.servers.matrix-synapse = lib.mkIf cfg.configureRedisLocally {
|
||||
enable = true;
|
||||
user = "matrix-synapse";
|
||||
};
|
||||
|
||||
environment.systemPackages = [ registerNewMatrixUser ];
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user