2022-04-27 00:21:19 +02:00
|
|
|
{ pkgs
|
|
|
|
, config
|
|
|
|
, lib
|
|
|
|
, ...
|
2022-03-01 22:19:03 +01:00
|
|
|
}:
|
|
|
|
with lib; let
|
|
|
|
cfg = config.eboskma.programs.fish;
|
2022-04-27 00:21:19 +02:00
|
|
|
in
|
|
|
|
{
|
2021-11-17 16:32:18 +01:00
|
|
|
options.eboskma.programs.fish = {
|
|
|
|
enable = mkEnableOption "Enable fish shell";
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf (cfg.enable) {
|
|
|
|
programs.fish = {
|
|
|
|
enable = true;
|
2022-04-27 00:21:19 +02:00
|
|
|
functions = import ./functions.nix { inherit (pkgs) git; };
|
2021-11-17 16:32:18 +01:00
|
|
|
|
2021-12-18 16:23:14 +01:00
|
|
|
plugins = [
|
|
|
|
{
|
|
|
|
name = "dracula";
|
|
|
|
src = pkgs.fetchFromGitHub {
|
|
|
|
owner = "dracula";
|
|
|
|
repo = "fish";
|
2022-04-22 00:15:29 +02:00
|
|
|
rev = "62b109f12faab5604f341e8b83460881f94b1550";
|
|
|
|
sha256 = "0TlKq2ur2I6Bv7pu7JObrJxV0NbQhydmCuUs6ZdDU1I=";
|
2021-12-18 16:23:14 +01:00
|
|
|
};
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
2021-11-21 19:07:12 +01:00
|
|
|
shellAliases = {
|
2021-11-23 12:09:24 +01:00
|
|
|
# code = "${pkgs.vscode}/bin/code --enable-features=UseOzonePlatform --ozone-platform=wayland";
|
2022-03-15 08:30:37 +01:00
|
|
|
ls = "${pkgs.exa}/bin/exa -Fb --git";
|
2022-01-13 09:03:22 +01:00
|
|
|
|
|
|
|
vimdiff = mkIf (config.eboskma.programs.neovim.enable) "nvim -d";
|
|
|
|
vim = mkIf (config.eboskma.programs.neovim.enable) "nvim";
|
|
|
|
vi = mkIf (config.eboskma.programs.neovim.enable) "nvim";
|
2021-11-21 19:07:12 +01:00
|
|
|
};
|
2021-12-06 09:58:39 +01:00
|
|
|
interactiveShellInit = ''
|
|
|
|
'';
|
2021-11-17 16:32:18 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
programs.starship = {
|
|
|
|
enable = true;
|
|
|
|
enableFishIntegration = true;
|
2021-11-21 19:07:12 +01:00
|
|
|
settings = {
|
|
|
|
aws.disabled = true;
|
2022-04-22 00:15:29 +02:00
|
|
|
character = {
|
|
|
|
success_symbol = "[λ](bold #f8f8f2)";
|
|
|
|
error_symbol = "[λ](bold #ff5555)";
|
|
|
|
};
|
|
|
|
cmd_duration.style = "bold #f1fa8c";
|
2021-11-25 17:18:13 +01:00
|
|
|
directory.read_only = " ";
|
2022-04-22 00:15:29 +02:00
|
|
|
directory.style = "bold #50fa7b";
|
2021-11-25 17:18:13 +01:00
|
|
|
docker_context.symbol = " ";
|
|
|
|
elixir.symbol = " ";
|
2021-11-21 19:07:12 +01:00
|
|
|
git_branch.symbol = " ";
|
2022-04-22 00:15:29 +02:00
|
|
|
git_branch.style = "bold #ff79c6";
|
|
|
|
git_status.style = "bold #ff5555";
|
|
|
|
hostname.style = "bold #ff5555";
|
2021-11-25 17:18:13 +01:00
|
|
|
nix_shell.symbol = " ";
|
2021-11-21 19:07:12 +01:00
|
|
|
memory_usage.symbol = " ";
|
|
|
|
package.symbol = " ";
|
|
|
|
python.symbol = " ";
|
|
|
|
rust.symbol = " ";
|
|
|
|
time.disabled = false;
|
2022-04-22 00:15:29 +02:00
|
|
|
username = {
|
|
|
|
format = "[$user]($style) on ";
|
|
|
|
style_user = "bold #bd93f9";
|
|
|
|
};
|
2021-11-21 19:07:12 +01:00
|
|
|
status = {
|
|
|
|
disabled = false;
|
|
|
|
format = "[$symbol $status]($style) ";
|
|
|
|
};
|
|
|
|
};
|
2021-11-17 16:32:18 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
programs.fzf = {
|
|
|
|
enable = true;
|
|
|
|
enableFishIntegration = true;
|
|
|
|
changeDirWidgetCommand = "${pkgs.fd}/bin/fd -type d";
|
|
|
|
defaultCommand = "${pkgs.fd}/bin/fd -type f";
|
|
|
|
defaultOptions = [
|
|
|
|
"--cycle"
|
|
|
|
"--layout=reverse"
|
|
|
|
"--border"
|
|
|
|
"--height=90%"
|
|
|
|
"--preview-window=wrap"
|
|
|
|
"--marker='*'"
|
|
|
|
];
|
|
|
|
fileWidgetCommand = "${pkgs.fd}/bin/fd -type f";
|
|
|
|
};
|
|
|
|
|
|
|
|
programs.direnv = {
|
|
|
|
enable = true;
|
|
|
|
nix-direnv.enable = true;
|
|
|
|
};
|
2021-11-25 17:18:13 +01:00
|
|
|
|
|
|
|
programs.zoxide = {
|
|
|
|
enable = true;
|
|
|
|
enableFishIntegration = true;
|
|
|
|
};
|
2021-11-17 16:32:18 +01:00
|
|
|
};
|
|
|
|
}
|