{ config, pkgs, lib, ... }: let inherit (builtins) map; inherit (lib) getAttrs removePrefix; nixfiles = config.home.homeDirectory + "/projects/alin.ovh/nixfiles"; direct_symlink = path: config.lib.file.mkOutOfStoreSymlink "${nixfiles}/${removePrefix "/" path}"; in { home.shell.enableFishIntegration = true; programs.fish = { enable = true; plugins = map (getAttrs [ "name" "src" ]) ( with pkgs.fishPlugins; [ done fzf-fish fifc autopair colored-man-pages fishbang (tide.overrideAttrs { version = "7.0.2"; src = pkgs.fetchFromGitHub { owner = "plttn"; repo = "tide"; hash = "sha256-e51L0JNNsGc3E7gY6udstFaDWg1V1OVWl9lMHFC+2MU="; rev = "a419157ff1ca4833dba74c27914cd8bb2a3c064b"; }; }) { name = "ghq"; src = pkgs.fetchFromGitHub { owner = "decors"; repo = "fish-ghq"; sha256 = "0cv7jpvdfdha4hrnjr887jv1pc6vcrxv2ahy7z6x562y7fd77gg9"; # date = "2021-07-16T13:17:09+09:00"; rev = "cafaaabe63c124bf0714f89ec715cfe9ece87fa2"; }; } ] ); shellAliases = { hist-freq-lines = lib.mkForce "history | sort | uniq -c | sort -gr | head -n100 | less"; hist-freq-commands = lib.mkForce "history | cut -d' ' -f 1 | sort | uniq -c | sort -gr | head -n100 | less"; }; }; xdg.configFile."fish/completions" = { recursive = true; source = direct_symlink "/user/settings/fish/completions"; }; xdg.configFile."fish/functions" = { recursive = true; source = direct_symlink "/user/settings/fish/functions"; }; xdg.configFile."fish/per-term" = { recursive = true; source = direct_symlink "/user/settings/fish/per-term"; }; xdg.configFile."fish/conf.d/user_config.fish" = { source = direct_symlink "/user/settings/fish/config.fish"; }; programs.nix-your-shell = { enable = true; nix-output-monitor.enable = true; enableFishIntegration = true; }; home.activation.tide-configure = '' run ${lib.getExe config.programs.fish.package} -c ' tide configure \ --auto \ --style=Lean \ --prompt_colors="16 colors" \ --show_time="24-hour format" \ --lean_prompt_height="Two lines" \ --prompt_connection=Disconnected \ --prompt_spacing=Compact \ --icons="Few icons" ' ''; }