{
  lib,
  config,
  ...
}: let
  inherit (lib) mkIf mkEnableOption;
  cfg = config.horseman.dots.eza;
  username = config.horseman.username;
in {
  options = {
    horseman.dots.eza = {
      enable = mkEnableOption "~/.config/eza/theme.yml";
    };
  };

  config = mkIf cfg.enable {
    home-manager.users.${username}.xdg.configFile."eza/theme.yml".text = ''
      date:
        foreground: White

      users:
        user_you:
          foreground: Yellow
          is_bold: false
        user_others:
          foreground: Yellow
        user_root:
          foreground: Red

      size:
        number_byte:
          is_bold: false
        number_kilo:
          is_bold: false
        number_mega:
          is_bold: false
        number_giga:
          is_bold: false
        number_huge:
          is_bold: false

      perms:
        user_read:
          foreground: Green
          is_bold: false
        user_write:
          foreground: Green
          is_bold: false
        user_execute:
          foreground: Green
          is_bold: false
        group_read:
          foreground: Blue
          is_bold: false
        group_write:
          foreground: Blue
          is_bold: false
        group_execute:
          foreground: Blue
          is_bold: false
        other_read:
          foreground: Red
          is_bold: false
        other_write:
          foreground: Red
          is_bold: false
        other_execute:
          foreground: Red
          is_bold: false
    '';
  };
}
