nix-managed-macbook/programs/fish.nix

36 lines
781 B
Nix
Raw Normal View History

{ inputs, config, pkgs, ... }:
2022-09-27 13:08:52 +05:30
{
programs.fish = {
enable = true;
plugins = [
{
name = "foreign-env";
src = inputs.fish-plugin-foreign-env;
2022-09-27 13:08:52 +05:30
}
{
name = "fzf";
src = inputs.fish-plugin-fzf;
2022-09-27 13:08:52 +05:30
}
];
2022-09-27 17:58:53 +05:30
functions = {
where = "readlink -f (which $argv)";
ghe =
"set -l dir (mktemp -d); git clone --depth 1 https://github.com/$argv $dir; cd $dir; ranger;";
};
2022-09-27 13:08:52 +05:30
interactiveShellInit = ''
fzf_configure_bindings --git_status=\cs --history=\cr --variables=\cv --directory=\cf --git_log=\cg
2022-09-29 11:39:28 +05:30
neofetch
2022-09-27 13:08:52 +05:30
'';
shellInit = ''
# nix
2022-09-30 15:34:01 +05:30
fenv source /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
2023-11-20 13:04:04 +05:30
fish_add_path -m ~/.local/bin ~/.cabal/bin
2022-09-27 13:08:52 +05:30
'';
};
}