Fish: Difference between revisions
imported>Jtojnar modernize shell setiing |
imported>Legendofmiracles adds a bit of examples of how to configure fish with home-manager |
||
Line 16: | Line 16: | ||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
== Managing fish plugins with Home Manager == | |||
In order to manage fish with home manager you also have to enable it in your <code>home.nix</code>. | |||
Then you can add new ones by adding them to the list of submodules of <code>programs.fish.plugins</code>. So for example for the plugin <code>z</code> from jethrokuan on github. | |||
<code> | |||
programs.fish.enable = true; | |||
programs.fish.plugins = [{ | |||
name = "z"; | |||
src = pkgs.fetchFromGitHub { | |||
owner = "jethrokuan"; | |||
repo = "z"; | |||
rev = "e0e1b9dfdba362f8ab1ae8c1afc7ccf62b89f7eb"; | |||
sha256 = "0dbnir6jbwjpjalz14snzd3cgdysgcs3raznsijd6savad3qhijc"; | |||
}; | |||
}]; | |||
</code> | |||
== Useful scripts == | == Useful scripts == | ||
Line 43: | Line 63: | ||
=== Environments === | === Environments === | ||
Helper functions that put you in a nix-shell with the given packages installed. | Helper functions that put you in a nix-shell with the given packages installed. You can either put these in <code>programs.fish.function</code> with home-manager or in <code>~/.config/fish/functions/fish_prompt.fish</code> without. | ||
==== haskellEnv ==== | ==== haskellEnv ==== |