Download : Limit to 4G memory.

This commit is contained in:
Dmitry Voronin 2024-06-15 17:49:19 +03:00
parent d92ac0f4d0
commit d5041c3b2f
Signed by: voronind
SSH key fingerprint: SHA256:3kBb4iV2ahufEBNq+vFbUe4QYfHt98DHQjN7QaptY9k
2 changed files with 4 additions and 5 deletions

View file

@ -1,5 +1,6 @@
{ container, lib, ... } @args: let { container, lib, ... } @args: let
cfg = container.config.download; cfg = container.config.download;
memLimit = "4G";
in { in {
systemd.tmpfiles.rules = container.mkContainerDir cfg [ systemd.tmpfiles.rules = container.mkContainerDir cfg [
"data" "data"
@ -21,6 +22,8 @@ in {
dataDir = "/var/lib/deluge"; dataDir = "/var/lib/deluge";
web.enable = true; web.enable = true;
}; };
systemd.services.deluged.serviceConfig.MemoryLimit = memLimit;
}; };
}; };
} }

View file

@ -48,11 +48,7 @@ in {
dataDir = "/var/lib/jellyfin"; dataDir = "/var/lib/jellyfin";
}; };
systemd.services.jellyfin = { systemd.services.jellyfin.serviceConfig.MemoryLimit = memLimit;
serviceConfig = {
MemoryLimit = memLimit;
};
};
}; };
}; };
} }