nixos/matrix-synapse: put all services into a slice

Part of #279915

Makes it easier to configure e.g. resource restrictions for the entire
application.
This commit is contained in:
Maximilian Bosch
2025-12-26 18:02:55 +01:00
parent 68fdcd0b5e
commit f857b10382
@@ -1441,6 +1441,10 @@ in
gid = config.ids.gids.matrix-synapse;
};
systemd.slices.system-synapse = {
description = "Matrix reference homeserver";
};
systemd.targets.matrix-synapse = lib.mkIf hasWorkers {
description = "Synapse Matrix parent target";
wants = [ "network-online.target" ];
@@ -1480,6 +1484,7 @@ in
ExecReload = "${pkgs.util-linux}/bin/kill -HUP $MAINPID";
Restart = "on-failure";
UMask = "0077";
Slice = "system-synapse.slice";
# Security Hardening
# Refer to systemd.exec(5) for option descriptions.