From 4f1bb4326edaaf337cf87401cf433742ca5fb2df Mon Sep 17 00:00:00 2001 From: Jacob Babor Date: Sun, 3 May 2026 03:14:33 -0500 Subject: [PATCH] Add zswap --- flake.nix | 1 + swap/zswap.nix | 8 ++++++++ 2 files changed, 9 insertions(+) create mode 100644 swap/zswap.nix diff --git a/flake.nix b/flake.nix index 60ffee5..770d811 100644 --- a/flake.nix +++ b/flake.nix @@ -13,6 +13,7 @@ ./hosts/laptop-nixos-1/configuration.nix ./hosts/laptop-nixos-1/hardware-configuration.nix ./swap/16G.nix + ./swap/zswap.nix ]; }; }; diff --git a/swap/zswap.nix b/swap/zswap.nix new file mode 100644 index 0000000..413ceb2 --- /dev/null +++ b/swap/zswap.nix @@ -0,0 +1,8 @@ +{ + boot.kernelParams = [ + "zswap.enabled=1" + "zswap.compressor=zstd" + "zswap.zpool=zsmalloc" + "zswap.max_poool_percent=30" + ] +}