nix-config/modules/home/shell/fish.nix

51 lines
1.1 KiB
Nix
Raw Permalink Normal View History

2024-05-07 03:23:55 -04:00
{pkgs, ...}:
with pkgs; {
programs = {
fish = let
2024-08-21 01:05:38 -04:00
mkFishPlugin = sources: {
inherit (sources) src;
name = sources.pname;
};
2024-10-30 11:59:39 -04:00
sources = import ../../../_sources/generated.nix {inherit (pkgs) fetchurl fetchFromGitHub;};
2024-08-21 01:05:38 -04:00
extraPlugins = lib.attrsets.mapAttrsToList (_: value: mkFishPlugin value) sources;
2024-05-07 03:23:55 -04:00
mkFishPlugins = names:
map (name: {
inherit name;
src = pkgs.fishPlugins.${name}.src;
})
names;
in {
enable = true;
plugins =
2024-08-21 01:05:38 -04:00
extraPlugins
2024-08-14 01:39:04 -04:00
++ (mkFishPlugins ["autopair" "bass" "colored-man-pages" "done" "fifc" "forgit" "grc"]);
2024-05-07 03:23:55 -04:00
shellAliases = {
cat = "${bat}/bin/bat";
df = "${duf}/bin/duf";
rm = "${rm-improved}/bin/rip";
cp = "${xcp}/bin/xcp";
};
interactiveShellInit = ''
function fish_greeting
macchina
end
2024-09-26 23:34:21 -04:00
2024-10-30 11:59:39 -04:00
bind --erase \ct
2024-09-26 23:34:21 -04:00
fish_add_path /opt/homebrew/bin
fish_add_path /Users/marshall/.nix-profile/bin
2024-05-07 03:23:55 -04:00
'';
};
starship = {
enable = true;
2024-05-16 02:40:39 -04:00
catppuccin.enable = true;
2024-05-07 03:23:55 -04:00
};
};
}