{
  config,
  pkgs,
  ...
}: let
  inherit (config.colorscheme) colors;
in {
  programs.alacritty = {
    enable = true;
  };
  xdg.configFile."alacritty.toml".source = (pkgs.formats.toml {}).generate "alacritty" {
    window = {
      opacity = 0.5;
    };
    font = {
      size = 9.5;
    };
    colors = {
      primary = {
        background = "#1E1E2E";
        foreground = "#CDD6F4";
        dim_foreground = "#CDD6F4";
        bright_foreground = "#CDD6F4";
      };
      cursor = {
        text = "#1E1E2E";
        cursor = "#F5E0DC";
      };
      vi_mode_cursor = {
        text = "#1E1E2E";
        cursor = "#B4BEFE";
      };
      search = {
        matches = {
          foreground = "#1E1E2E";
          background = "#A6ADC8";
        };
        focused_match = {
          foreground = "#1E1E2E";
          background = "#A6E3A1";
        };
      };

      footer_bar = {
        foreground = "#1E1E2E";
        background = "#A6ADC8";
      };

      hints = {
        start = {
          foreground = "#1E1E2E";
          background = "#F9E2AF";
        };

        end = {
          foreground = "#1E1E2E";
          background = "#A6ADC8";
        };
      };

      selection = {
        text = "#1E1E2E";
        background = "#F5E0DC";
      };

      normal = {
        black = "#45475A";
        red = "#F38BA8";
        green = "#A6E3A1";
        yellow = "#F9E2AF";
        blue = "#89B4FA";
        magenta = "#F5C2E7";
        cyan = "#94E2D5";
        white = "#BAC2DE";
      };

      bright = {
        black = "#585B70";
        red = "#F38BA8";
        green = "#A6E3A1";
        yellow = "#F9E2AF";
        blue = "#89B4FA";
        magenta = "#F5C2E7";
        cyan = "#94E2D5";
        white = "#A6ADC8";
      };
      dim = {
        black = "#45475A";
        red = "#F38BA8";
        green = "#A6E3A1";
        yellow = "#F9E2AF";
        blue = "#89B4FA";
        magenta = "#F5C2E7";
        cyan = "#94E2D5";
        white = "#BAC2DE";
      };
    };
  };
}
