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

  cfg = config.marleyos.appearance.base;
  inherit (config.marleyos.theme) colors;
  inherit (config.marleyos) isDesktop;
in
{
  options.marleyos.appearance.base.enable = mkEnableOption "base";

  config = mkIf cfg.enable {
    home.packages = with pkgs; [
      maple-mono-NF
    ];

    rose-pine.pointerCursor = mkIf colors.isRosePine enabled;

    marleyos.theme = {
      colors = {
        default = "dark";

        dark = {
          base = "rose-pine";
          flavor = "main";
        };

        light = {
          base = "rose-pine";
          flavor = "dawn";
        };
      };

      icons = {
        package = pkgs.kora-icon-theme;
        name = "kora";
      };

      pinentry = if isDesktop then pkgs.pinentry-gtk2 else pkgs.pinentry-curses;
    };

    # TODO: package font with harfbuzz features.
    fonts.fontconfig.defaultFonts.monospace = [ "Maple Mono NF" ];
  };
}
