mirror of
https://github.com/aviallon/nixos-lib.git
synced 2026-04-05 17:27:50 +00:00
[Filesystems] Set /tmp size to 150% of RAM if swap is active, and 75% otherwise
This commit is contained in:
parent
b18b9c77f6
commit
373e753898
1 changed files with 6 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue