nixos-config/home-manager/modules/fish/default.nix
Erwin Boskma 4cd0f83ce8
Some checks failed
/ check (push) Failing after 2m46s
Run nixfmt
2024-02-05 11:46:52 +01:00

72 lines
1.7 KiB
Nix

{
pkgs,
config,
lib,
...
}:
with lib;
let
cfg = config.eboskma.programs.fish;
in
{
options.eboskma.programs.fish = {
enable = mkEnableOption "Enable fish shell";
};
config = mkIf cfg.enable {
programs = {
fish = {
enable = true;
functions = import ./functions.nix { inherit (pkgs) git coreutils; };
plugins = [
{
name = "dracula";
src = pkgs.fetchFromGitHub {
owner = "dracula";
repo = "fish";
rev = "62b109f12faab5604f341e8b83460881f94b1550";
sha256 = "0TlKq2ur2I6Bv7pu7JObrJxV0NbQhydmCuUs6ZdDU1I=";
};
}
];
shellAliases = {
# code = "${pkgs.vscode}/bin/code --enable-features=UseOzonePlatform --ozone-platform=wayland";
ls = "${pkgs.eza}/bin/eza -Fb --git";
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";
};
interactiveShellInit = "";
};
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";
};
direnv = {
enable = true;
nix-direnv.enable = true;
};
zoxide = {
enable = true;
enableFishIntegration = true;
};
};
};
}