weinturm-infra/modules/zram.nix
2025-07-18 17:40:46 +02:00

25 lines
408 B
Nix

{
config,
lib,
...
}: let
cfg = config.weinturm.zram;
in {
options.weinturm = with lib; {
zram = {
enable = mkOption {
type = types.bool;
default = true;
description = "Whether to enable zram swap";
};
};
};
config = {
zramSwap = {
inherit (cfg) enable;
algorithm = "zstd";
memoryPercent = 60;
priority = 1;
};
};
}