{
  lib,
  config,
  ...
}:
let
  inherit (lib) mkEnableOption mkIf;

  cfg = config.marleyos.programs.eza;
in
{
  options.marleyos.programs.eza.enable = mkEnableOption "eza";

  config = mkIf cfg.enable {
    programs.eza = {
      enable = true;

      git = true;
      icons = "always";
      colors = "always";

      extraOptions = [
        "--all"
        "--sort=name"
        "--group-directories-first"
        "--header"
        "--group"
      ];
    };
  };
}
