{
  config,
  lib,
  namespace,
  ...
}:
let
  cfg = config.${namespace}.shells.starship;
in
{
  options.${namespace}.shells.starship = with lib.${namespace}; {
    enable = mkOptBool';
  };

  config = lib.mkIf cfg.enable {
    programs.starship = {
      enable = true;

      settings = {
        add_newline = false;

        format = ''
          $username@$hostname $os $directory$all$time $shell$cmd_duration $character
        '';

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

        directory = {
          disabled = false;
          truncation_length = 8;
          truncation_symbol = "‚Ä¶/";
          truncate_to_repo = false;
        };

        cmd_duration = {
          disabled = false;
          min_time = 2000;
          format = " [took $duration](bold red)";
        };

        git_branch = {
          ignore_branches = [ ];
        };

        hostname = {
          ssh_only = false;
          format = "[$ssh_symbol](bold blue)[$hostname](bold red)";
          disabled = false;
        };

        os = {
          disabled = false;
        };

        os.symbols = {
          Arch = "üêß";
          Artix = "üêß";
        };

        shell = {
          disabled = false;
          bash_indicator = "bash";
          fish_indicator = "fish";
          format = "[\\($indicator\\)](bold blue)";
        };

        time = {
          disabled = false;
          time_format = "%R";
          format = "üïô [$time]($style)";
        };

        username = {
          disabled = false;
          show_always = true;
          format = "[$user]($style)";
        };

        aws.disabled = true;
        azure.disabled = true;
        gcloud.disabled = true;
        singularity.disabled = true;
      };
    };
  };
}
