{
  pkgs,
  lib,
  config,
  ...
}:
{
  options = {
    starship.enable = lib.mkEnableOption "enables custom starship config";
  };
  config = lib.mkIf config.zsh.enable {
    programs.starship.enable = true;
    programs.starship.settings = {
      add_newline = false;
      format = "$all";
      right_format = "$cmd_duration";

      username = {
        style_user = "green bold";
        style_root = "red bold";
        format = "[$user]($style) ";
        disabled = false;
        show_always = true;
      };

      hostname = {
        ssh_only = false;
        format = "on [$hostname](bold purple) ";
        trim_at = ".";
        disabled = false;
      };

      character = {
        success_symbol = "[‚ûú](bold green)";
        error_symbol = "[‚úó](bold red)";
      };

      directory = {
        read_only = " ÔÄ£ ";
        truncation_length = 10;
        truncate_to_repo = true;
        style = "bold blue";
      };

      cmd_duration = {
        format = "[$duration]($style) ";
        min_time = 4;
        show_milliseconds = false;
        disabled = false;
        style = "bold italic yellow";
      };

      aws = {
        symbol = "ÓåΩ  ";
      };

      gcloud = {
        disabled = true;
      };

      conda = {
        symbol = "ÔÑå ";
      };

      dart = {
        symbol = "Óûò ";
      };

      docker_context = {
        symbol = "Ôåà ";
        format = "via [$symbol$context]($style) ";
        style = "blue bold";
        only_with_files = true;
        detect_files = [
          "docker-compose.yml"
          "docker-compose.yaml"
          "Dockerfile"
        ];
        detect_folders = [ ];
        disabled = false;
      };

      elixir = {
        symbol = "Óâµ ";
      };

      git_branch = {
        symbol = "Ôêò ";
      };

      git_status = {
        format = ''([\[$all_status$ahead_behind\]]($style) )'';
        stashed = "[\${count}*](green)";
        modified = "[\${count}+](yellow)";
        deleted = "[\${count}-](red)";
        conflicted = "[\${count}~](red)";
        ahead = "‚á°\${count}";
        behind = "‚á£\${count}";
        untracked = "[\${count}?](blue)";
        staged = "[\${count}+](green)";
      };

      git_state = {
        style = "bold red";
        format = "[$state( $progress_current/$progress_total) ]($style)";
        rebase = "rebase";
        merge = "merge";
        revert = "revert";
        cherry_pick = "cherry";
        bisect = "bisect";
        am = "am";
        am_or_rebase = "am/rebase";
      };

      golang = {
        symbol = "Û∞üì ";
      };

      haskell = {
        symbol = "Œª ";
      };

      memory_usage = {
        symbol = "ÓøÖ ";
      };

      nim = {
        symbol = "Óô∑ ";
      };

      nix_shell = {
        symbol = "Ôãú ";
      };

      package = {
        symbol = "Ó¨© ";
      };

      perl = {
        symbol = "Óù© ";
      };

      python = {
        symbol = "Ó¥õ ";
        format = "via [\${symbol}(\${version} )(\($virtualenv\) )]($style)";
        style = "bold yellow";
        pyenv_prefix = "venv ";
        python_binary = [
          "./venv/bin/python"
          "python"
          "python3"
          "python2"
        ];
        detect_extensions = [ "py" ];
        # Hacky fix to not show python in $HOME directory by negative matching .config/ directory;
        detect_folders = [ "!.config" ];
        version_format = "\${raw}";
      };

      ruby = {
        symbol = "Óàæ ";
      };

      rust = {
        symbol = "ü¶Ä ";
      };

      swift = {
        symbol = "Óöô ";
      };

      nodejs = {
        format = "via [ÓµÑ  $version](bold green) ";
        detect_files = [
          "package.json"
          ".node-version"
        ];
        detect_folders = [ "node_modules" ];
      };
    };
  };
}
