summaryrefslogtreecommitdiff
path: root/modules/memory.nix
diff options
context:
space:
mode:
Diffstat (limited to 'modules/memory.nix')
-rw-r--r--modules/memory.nix16
1 files changed, 16 insertions, 0 deletions
diff --git a/modules/memory.nix b/modules/memory.nix
new file mode 100644
index 0000000..9a7f0cf
--- /dev/null
+++ b/modules/memory.nix
@@ -0,0 +1,16 @@
+{ config, pkgs, ... }:
+
+{
+ zramSwap = {
+ enable = true;
+ memoryPercent = 25;
+ algorithm = "zstd";
+ };
+
+ swapDevices = [
+ {
+ device = "/swap";
+ size = 32 * 1024;
+ }
+ ];
+}