modules/nixos/common: optimise zram
This commit is contained in:
parent
280a5ed7c4
commit
9a2c568849
1 changed files with 9 additions and 0 deletions
|
@ -40,6 +40,15 @@
|
|||
|
||||
zramSwap.enable = true;
|
||||
|
||||
# https://github.com/NixOS/nixpkgs/pull/268121
|
||||
# https://wiki.archlinux.org/title/Zram#Optimizing_swap_on_zram
|
||||
boot.kernel.sysctl = {
|
||||
"vm.page-cluster" = 0;
|
||||
"vm.swappiness" = 180;
|
||||
"vm.watermark_boost_factor" = 0;
|
||||
"vm.watermark_scale_factor" = 125;
|
||||
};
|
||||
|
||||
security.acme.defaults.email = "trash@nix-community.org";
|
||||
security.acme.acceptTerms = true;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue