mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-14 06:00:33 +03:00
nixos/matrix-sliding-sync: add dependency on matrix-synapse if running locally and restart
This commit is contained in:
parent
0cbe9f69c2
commit
c8b5539626
1 changed files with 7 additions and 2 deletions
|
@ -80,8 +80,11 @@ in
|
|||
} ];
|
||||
};
|
||||
|
||||
systemd.services.matrix-sliding-sync = {
|
||||
after = lib.optional cfg.createDatabase "postgresql.service";
|
||||
systemd.services.matrix-sliding-sync = rec {
|
||||
after =
|
||||
lib.optional cfg.createDatabase "postgresql.service"
|
||||
++ lib.optional config.services.matrix-synapse.enable "matrix-synapse.service";
|
||||
wants = after;
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
environment = cfg.settings;
|
||||
serviceConfig = {
|
||||
|
@ -90,6 +93,8 @@ in
|
|||
ExecStart = lib.getExe cfg.package;
|
||||
StateDirectory = "matrix-sliding-sync";
|
||||
WorkingDirectory = "%S/matrix-sliding-sync";
|
||||
Restart = "on-failure";
|
||||
RestartSec = "1s";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue