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

  cfg = config.plusultra.cli-apps.starship;
in
{
  options.plusultra.cli-apps.starship = {
    enable = mkEnableOption "starship";
  };

  config = mkIf cfg.enable {
    home.packages = with pkgs; [
      (pkgs.nerdfonts.override { fonts = [ "FiraCode" "DroidSansMono" "JetBrainsMono" ]; })
    ];
    programs.starship = {
      enable = true;
      settings = {
        container.format = "[\\[$name\\]]($style) ";
        git_status = {
          ahead = "⇡$\{count}";
          diverged = "⇕⇡$\{ahead_count}⇣$\{behind_count}";
          behind = "⇣$\{count}";
        };
      };
    };
  };
}
