{pkgs, ...}:
with pkgs; {
  programs = {
    fish = let
      mkFishPlugin = sources: {
        inherit (sources) src;
        name = sources.pname;
      };

      sources = import ../../../_sources/generated.nix {inherit (pkgs) fetchurl fetchFromGitHub;};

      extraPlugins = lib.attrsets.mapAttrsToList (_: value: mkFishPlugin value) sources;

      mkFishPlugins = names:
        map (name: {
          inherit name;
          src = pkgs.fishPlugins.${name}.src;
        })
        names;
    in {
      enable = true;

      plugins =
        extraPlugins
        ++ (mkFishPlugins ["autopair" "bass" "colored-man-pages" "done" "fifc" "forgit" "grc"]);

      shellAliases = {
        cat = "${bat}/bin/bat";
        df = "${duf}/bin/duf";
        rm = "${rm-improved}/bin/rip";
        cp = "${xcp}/bin/xcp";
      };

      interactiveShellInit = ''
        function fish_greeting
          macchina
        end

        bind --erase \ct
        fish_add_path /opt/homebrew/bin
        fish_add_path /Users/marshall/.nix-profile/bin
      '';
    };

    starship = {
      enable = true;
      catppuccin.enable = true;
    };
  };
}
