nix-config/modules/home/shell/fish.nix
2024-09-26 23:34:21 -04:00

50 lines
1.1 KiB
Nix

{pkgs, ...}:
with pkgs; {
programs = {
fish = let
mkFishPlugin = sources: {
inherit (sources) src;
name = sources.pname;
};
sources = import ../../../_sources/generated.nix {inherit (pkgs) 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
fish_add_path /opt/homebrew/bin
fish_add_path /Users/marshall/.nix-profile/bin
'';
};
starship = {
enable = true;
catppuccin.enable = true;
};
};
}