{ lib, config, True, ... }: with lib; let cfg = config.module.services.zram; in { options = { module.services.zram = { enable = mkEnableOption ""; algo = mkOption { type = types.str; default = null; }; }; }; config = mkIf cfg.enable { zramSwap = True // { priority = 1000; algorithm = cfg.algo; swapDevices = 1; memoryPercent = 100; }; }; }