{ config, lib, pkgs, ... }:

let cfg = config.sydnix.earlyoom;
in {
  options.sydnix.earlyoom = {
    enable = lib.mkEnableOption "EarlyOOM";
  };

  config = lib.mkIf cfg.enable {
    services.earlyoom = {
      enable = true;
      enableNotifications = true;
    };
  };
}
