nixos/matrix/*: change dependencies on matrix-synapse.service to serviceUnit

This commit is contained in:
Sophie Tauchert 2023-11-05 21:42:33 +01:00
parent 70dc536ae0
commit 8627e0ef58
No known key found for this signature in database
GPG key ID: 52701DE5F5F51125
6 changed files with 10 additions and 10 deletions

View file

@ -100,9 +100,9 @@ in {
serviceDependencies = mkOption {
type = with types; listOf str;
default = optional config.services.matrix-synapse.enable "matrix-synapse.service";
default = optional config.services.matrix-synapse.enable config.services.matrix-synapse.serviceUnit;
defaultText = literalExpression ''
optional config.services.matrix-synapse.enable "matrix-synapse.service"
optional config.services.matrix-synapse.enable config.services.matrix-synapse.serviceUnit
'';
description = lib.mdDoc ''
List of Systemd services to require and wait for when starting the application service,

View file

@ -83,7 +83,7 @@ in
systemd.services.matrix-sliding-sync = rec {
after =
lib.optional cfg.createDatabase "postgresql.service"
++ lib.optional config.services.matrix-synapse.enable "matrix-synapse.service";
++ lib.optional config.services.matrix-synapse.enable config.services.matrix-synapse.serviceUnit;
wants = after;
wantedBy = [ "multi-user.target" ];
environment = cfg.settings;

View file

@ -145,7 +145,7 @@ in {
wantedBy = [ "multi-user.target" ];
wants = [
"network-online.target"
] ++ optional config.services.matrix-synapse.enable "matrix-synapse.service"
] ++ optional config.services.matrix-synapse.enable config.services.matrix-synapse.serviceUnit
++ optional cfg.configurePostgresql "postgresql.service";
after = wants;

View file

@ -122,9 +122,9 @@ in {
serviceDependencies = mkOption {
type = with types; listOf str;
default = optional config.services.matrix-synapse.enable "matrix-synapse.service";
default = optional config.services.matrix-synapse.enable config.services.matrix-synapse.serviceUnit;
defaultText = literalExpression ''
optional config.services.matrix-synapse.enable "matrix-synapse.service"
optional config.services.matrix-synapse.enable config.services.matrix-synapse.serviceUnit
'';
description = lib.mdDoc ''
List of Systemd services to require and wait for when starting the application service.

View file

@ -100,9 +100,9 @@ in {
serviceDependencies = lib.mkOption {
type = with lib.types; listOf str;
default = lib.optional config.services.matrix-synapse.enable "matrix-synapse.service";
default = lib.optional config.services.matrix-synapse.enable config.services.matrix-synapse.serviceUnit;
defaultText = lib.literalExpression ''
optional config.services.matrix-synapse.enable "matrix-synapse.service"
optional config.services.matrix-synapse.enable config.services.matrix-synapse.serviceUnits
'';
description = lib.mdDoc ''
List of Systemd services to require and wait for when starting the application service.

View file

@ -66,9 +66,9 @@ in {
};
serviceDependencies = mkOption {
type = with types; listOf str;
default = optional config.services.matrix-synapse.enable "matrix-synapse.service";
default = optional config.services.matrix-synapse.enable config.services.matrix-synapse.serviceUnit;
defaultText = literalExpression ''
optional config.services.matrix-synapse.enable "matrix-synapse.service"
optional config.services.matrix-synapse.enable config.services.matrix-synapse.serviceUnit
'';
description = lib.mdDoc ''
List of Systemd services to require and wait for when starting the application service.