nix-config/modules/home/shell/fish.nix
2024-08-21 01:05:38 -04:00

47 lines
1,014 B
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
'';
};
starship = {
enable = true;
catppuccin.enable = true;
};
};
}