[Filesystems] Set /tmp size to 150% of RAM if swap is active, and 75% otherwise

This commit is contained in:
Antoine Viallon 2023-04-12 00:43:55 +02:00
parent b18b9c77f6
commit 373e753898
Signed by: aviallon
GPG key ID: 186FC35EDEB25716

View file

@ -119,6 +119,12 @@ in
};
boot.tmpOnTmpfs = true;
boot.tmpOnTmpfsSize =
let
hasSwap = length config.swapDevices > 0;
in
if hasSwap then "150%" else "75%"
;
services.smartd = {
enable = mkDefault true;