This commit is contained in:
Reid 2026-04-08 15:08:50 -07:00
parent 1c73349f55
commit c0590acdba
Signed by: reidlab
GPG key ID: DAF5EAF6665839FD
2 changed files with 21 additions and 0 deletions

View file

@ -93,6 +93,7 @@
system.flatpak.enable = true; system.flatpak.enable = true;
system.mpv.enable = true; system.mpv.enable = true;
system.ananicy.enable = true; system.ananicy.enable = true;
system.zswap.enable = true;
system.kdeconnect.enable = true; system.kdeconnect.enable = true;
# editors # editors
editors.micro.enable = true; editors.micro.enable = true;

View file

@ -0,0 +1,20 @@
{ lib, config, pkgs, ... }:
with lib;
let
cfg = config.modules.software.system.zswap;
in {
options.modules.software.system.zswap = {
enable = mkEnableOption "Enable zswap, a compressed RAM cache for swap pages";
};
config = mkIf cfg.enable {
boot.kernelParams = [
"zswap.enabled=1"
"zswap.shrinker_enabled=1" # high mem: shrink zswap, mv to swap
"zswap.max_pool_percent=20" # TODO: tune this (keep in mind shrinker is enabled)
"zswap.compressor=zstd" # lz4 is missing for some reason
"zswap.zpool=zsmalloc"
];
};
}