From f857b10382fe1999946fd550db53678ea07f0cdf Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Mon, 22 Dec 2025 12:34:07 +0100 Subject: [PATCH] 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. --- nixos/modules/services/matrix/synapse.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nixos/modules/services/matrix/synapse.nix b/nixos/modules/services/matrix/synapse.nix index ec5cf8aee8dd..58eb20815a98 100644 --- a/nixos/modules/services/matrix/synapse.nix +++ b/nixos/modules/services/matrix/synapse.nix @@ -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.