diff --git a/nixos/profiles/opt-in/zram-generator.nix b/nixos/profiles/opt-in/zram-generator.nix index 7cd02e6..47bde06 100644 --- a/nixos/profiles/opt-in/zram-generator.nix +++ b/nixos/profiles/opt-in/zram-generator.nix @@ -6,4 +6,12 @@ _: { zram-size = "ram"; }; }; + + # https://wiki.archlinux.org/title/Zram#Optimizing_swap_on_zram + boot.kernel.sysctl = { + "vm.swappiness" = 180; + "vm.watermark_boost_factor" = 0; + "vm.watermark_scale_factor" = 125; + "vm.page-cluster" = 0; + }; }