nix-managed-macbook/programs/fish.nix

38 lines
946 B
Nix
Raw Normal View History

{ inputs, config, pkgs, ... }:
2022-09-27 13:08:52 +05:30
2023-11-25 16:13:20 +05:30
let username = config.home.username;
in {
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-25 16:13:20 +05:30
fenv source /etc/profiles/per-user/${username}/etc/profile.d/hm-session-vars.sh
fish_add_path -m ~/.local/bin ~/.cabal/bin /etc/profiles/per-user/${username}/bin
2022-09-27 13:08:52 +05:30
'';
};
}