Hello everyone,
I am trying to understand how to add a fish plugin to my fish shell in my home-manager configuration and activate it. In the nixos-wiki-fish I could find how to use fish plugins from github like this:
programs.fish.enable = true;
programs.fish.plugins = [
{
name = "z";
src = pkgs.fetchFromGitHub {
owner = "jethrokuan";
repo = "z";
rev = "e0e1b9dfdba362f8ab1ae8c1afc7ccf62b89f7eb";
sha256 = "0dbnir6jbwjpjalz14snzd3cgdysgcs3raznsijd6savad3qhijc";
};
}
{ name = "grc"; src = pkgs.fishPlugins.grc.src; }
];
however, I don’t know how to add an already packaged fishPlugin to my home-manager configuration. When I try the following configuration:
programs.fish = {
enable = true;
plugins = with pkgs.fishPlugins; [ tide ];
};
I get the error:
error: undefined variable 'tide'
at /home/user/.config/nixpkgs/home.nix:113:40:
112| };
113| plugins = with pkgs.fishPlugins; [ tide ];
| ^
114| };
… while evaluating the attribute 'value'
and when I try:
programs.fish = {
enable = true;
plugins = [ { name = "tide"; src = pkgs.fishPlugins.tide.src; } ];
};
I get the error:
error: attribute 'tide' missing
at /home/user/.config/nixpkgs/home.nix:114:30:
113| plugins = [
114| { name = "tide"; src = pkgs.fishPlugins.tide.src; }
| ^
115| # { name = "colored-man-pages"; src = pkgs.fishPlugins.colored-man-pages.src; }
… while evaluating the attribute 'fishPlugins.tide.src'
I am new to nix and I don’t know how I can do this correctly. Can anyone help me to troubleshoot this or tell me how I am doing this wrong? I also read something about wrapFish in nixpkgs-fish, but I don’t really know how to use it. Any help is greatly appreciated!