Merge pull request #276407 from sinanmohd/dendrite-sliding-sync

nixos/matrix-sliding-sync: rename, init dendrite
This commit is contained in:
Nick Cao 2023-12-29 20:24:47 -05:00 committed by GitHub
commit 4a8d35315a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,10 +1,14 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
let let
cfg = config.services.matrix-synapse.sliding-sync; cfg = config.services.matrix-sliding-sync;
in in
{ {
options.services.matrix-synapse.sliding-sync = { imports = [
(lib.mkRenamedOptionModule [ "services" "matrix-synapse" "sliding-sync" ] [ "services" "matrix-sliding-sync" ])
];
options.services.matrix-sliding-sync = {
enable = lib.mkEnableOption (lib.mdDoc "sliding sync"); enable = lib.mkEnableOption (lib.mdDoc "sliding sync");
package = lib.mkPackageOption pkgs "matrix-sliding-sync" { }; package = lib.mkPackageOption pkgs "matrix-sliding-sync" { };
@ -83,6 +87,7 @@ in
systemd.services.matrix-sliding-sync = rec { systemd.services.matrix-sliding-sync = rec {
after = after =
lib.optional cfg.createDatabase "postgresql.service" lib.optional cfg.createDatabase "postgresql.service"
++ lib.optional config.services.dendrite.enable "dendrite.service"
++ lib.optional config.services.matrix-synapse.enable config.services.matrix-synapse.serviceUnit; ++ lib.optional config.services.matrix-synapse.enable config.services.matrix-synapse.serviceUnit;
wants = after; wants = after;
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];