2024-10-22 18:53:09 +05:30
|
|
|
{
|
|
|
|
inputs,
|
|
|
|
config,
|
|
|
|
osConfig,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}:
|
2022-09-27 13:08:52 +05:30
|
|
|
|
2024-09-14 11:07:38 +05:30
|
|
|
let
|
|
|
|
username = config.home.username;
|
|
|
|
fishPlugins = with pkgs.fishPlugins; [
|
|
|
|
autopair-fish
|
|
|
|
colored-man-pages
|
|
|
|
foreign-env
|
|
|
|
fzf-fish
|
|
|
|
gruvbox
|
|
|
|
];
|
|
|
|
|
2024-10-22 18:53:09 +05:30
|
|
|
in
|
|
|
|
{
|
2022-09-27 13:08:52 +05:30
|
|
|
programs.fish = {
|
|
|
|
enable = true;
|
|
|
|
|
2024-09-14 11:07:38 +05:30
|
|
|
plugins = builtins.map (p: {
|
|
|
|
name = p.meta.name;
|
|
|
|
src = p.src;
|
|
|
|
}) fishPlugins;
|
2022-09-27 17:58:53 +05:30
|
|
|
|
|
|
|
functions = {
|
|
|
|
where = "readlink -f (which $argv)";
|
2024-10-22 18:53:09 +05:30
|
|
|
ghe = "set -l dir (mktemp -d); git clone --depth 1 https://github.com/$argv $dir; cd $dir; ranger;";
|
2024-10-08 17:27:54 +05:30
|
|
|
nix-roots = ''
|
2024-10-18 17:41:54 +05:30
|
|
|
nix-store --gc --print-roots | grep -v lsof | grep -v libproc | grep -v "{temp:"
|
2024-10-08 17:27:54 +05:30
|
|
|
'';
|
|
|
|
nix-roots-tree = ''nix-roots | sed "s/\/nix\/store\///g" | as-tree'';
|
2022-09-27 17:58:53 +05:30
|
|
|
};
|
|
|
|
|
2022-09-27 13:08:52 +05:30
|
|
|
interactiveShellInit = ''
|
|
|
|
fzf_configure_bindings --git_status=\cs --history=\cr --variables=\cv --directory=\cf --git_log=\cg
|
2024-01-31 16:00:03 +05:30
|
|
|
|
|
|
|
if test -d (brew --prefix)"/share/fish/completions"
|
|
|
|
set -p fish_complete_path (brew --prefix)/share/fish/completions
|
|
|
|
end
|
|
|
|
|
|
|
|
if test -d (brew --prefix)"/share/fish/vendor_completions.d"
|
|
|
|
set -p fish_complete_path (brew --prefix)/share/fish/vendor_completions.d
|
|
|
|
end
|
2024-04-01 23:33:42 +05:30
|
|
|
|
2024-05-02 19:05:26 +05:30
|
|
|
fastfetch
|
2024-09-07 10:46:54 +05:30
|
|
|
set -gx EDITOR micro
|
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
|
2024-04-01 23:33:42 +05:30
|
|
|
fenv source /run/current-system/etc/bashrc
|
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
|
2024-01-31 16:00:03 +05:30
|
|
|
eval "$(${osConfig.homebrew.brewPrefix}/brew shellenv)"
|
2022-09-27 13:08:52 +05:30
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|