From d5041c3b2fe4ea62e7d6b36e573b979d7fa56992 Mon Sep 17 00:00:00 2001 From: Dmitry Voronin Date: Sat, 15 Jun 2024 17:49:19 +0300 Subject: [PATCH] Download : Limit to 4G memory. --- container/Download.nix | 3 +++ container/Watch.nix | 6 +----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/container/Download.nix b/container/Download.nix index 485cefed..ef3ed372 100644 --- a/container/Download.nix +++ b/container/Download.nix @@ -1,5 +1,6 @@ { container, lib, ... } @args: let cfg = container.config.download; + memLimit = "4G"; in { systemd.tmpfiles.rules = container.mkContainerDir cfg [ "data" @@ -21,6 +22,8 @@ in { dataDir = "/var/lib/deluge"; web.enable = true; }; + + systemd.services.deluged.serviceConfig.MemoryLimit = memLimit; }; }; } diff --git a/container/Watch.nix b/container/Watch.nix index c7e3d2ca..f2b7f17b 100644 --- a/container/Watch.nix +++ b/container/Watch.nix @@ -48,11 +48,7 @@ in { dataDir = "/var/lib/jellyfin"; }; - systemd.services.jellyfin = { - serviceConfig = { - MemoryLimit = memLimit; - }; - }; + systemd.services.jellyfin.serviceConfig.MemoryLimit = memLimit; }; }; }