{
  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;
    };
  };
}
