{ lib, config, ... }: let cfg = device.zram; in { options = { device.zram = { enable = lib.mkOption { type = lib.types.bool; default = false; description = "Zram settings for the device."; }; }; }; config = lib.mkIf cfg.enable { zramSwap = { enable = true; memoryPercent = 100; }; }; }