From 3f79c50d2444bc11e775536d0ec7d756e0a405b1 Mon Sep 17 00:00:00 2001 From: Dmitry Voronin Date: Fri, 14 Jun 2024 03:57:13 +0300 Subject: [PATCH] Watch : Limit to 4G ram. --- container/Watch.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/container/Watch.nix b/container/Watch.nix index 959494dd..c7e3d2ca 100644 --- a/container/Watch.nix +++ b/container/Watch.nix @@ -1,5 +1,6 @@ { container, lib, ... } @args: let cfg = container.config.watch; + memLimit = "8G"; in { systemd.tmpfiles.rules = container.mkContainerDir cfg [ "data" @@ -46,6 +47,12 @@ in { cacheDir = "/var/cache/jellyfin"; dataDir = "/var/lib/jellyfin"; }; + + systemd.services.jellyfin = { + serviceConfig = { + MemoryLimit = memLimit; + }; + }; }; }; }