From 6c1cd365a00a6aaa3f55855e873553e148043642 Mon Sep 17 00:00:00 2001 From: Ryan Yin Date: Thu, 21 Dec 2023 17:09:34 +0800 Subject: [PATCH] feat: enable zram --- modules/nixos/base/misc.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/nixos/base/misc.nix b/modules/nixos/base/misc.nix index 92c27caf..1ece2e0e 100644 --- a/modules/nixos/base/misc.nix +++ b/modules/nixos/base/misc.nix @@ -28,7 +28,8 @@ nix.settings.auto-optimise-store = true; # Enable in-memory compressed devices and swap space provided by the zram kernel module. - # By enable this, we can store more data in memory instead of fallback to disk-based swap devices directly, and thus improve I/O performance. + # By enable this, we can store more data in memory instead of fallback to disk-based swap devices directly, + # and thus improve I/O performance when we have a lot of memory. zramSwap = { enable = true; # one of "lzo", "lz4", "zstd"