nixos-config/home-manager/stvnliu/shells/fish/default.nix
Zhongheng Liu 28506968d7
feat: expanded fish configuration
Refactored fish configuration values into separate directory

Created fish init shell code for nh and zoxide

Reverted removal of cd=z alias since it works now
2024-08-11 20:40:39 +08:00

38 lines
926 B
Nix

{
pkgs,
config,
lib,
...
}: let
cfg = config.myShells.fish;
in
with lib; {
options = {
myShells.fish = {enable = mkEnableOption "Enables fish and components.";};
};
config = mkIf cfg.enable {
programs.fish = {
enable = true;
shellInit = ''
${builtins.readFile ./init/zoxide.fish}
${builtins.readFile ./init/nh.fish}
'';
shellAliases = import ../aliases {inherit pkgs;};
plugins = [
{
name = "z";
src = pkgs.fetchFromGitHub {
owner = "jethrokuan";
repo = "z";
rev = "ddeb28a7b6a1f0ec6dae40c636e5ca4908ad160a";
sha256 = "0c5i7sdrsp0q3vbziqzdyqn4fmp235ax4mn4zslrswvn8g3fvdyh";
};
}
{
name = "plugin-git";
src = pkgs.fishPlugins.plugin-git.src;
}
];
};
};
}