fish: extract custom plugins to submodule
1 file changed, 21 insertions(+), 36 deletions(-)
changed files
M user/settings/fish.nix → user/settings/fish.nix
@@ -9,47 +9,32 @@ inherit (lib) getAttrs removePrefix; nixfiles = config.home.homeDirectory + "/projects/alin.ovh/nixfiles"; direct_symlink = path: config.lib.file.mkOutOfStoreSymlink "${nixfiles}/${removePrefix "/" path}"; + + toPluginModule = getAttrs [ + "name" + "src" + ]; 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"; - }; - } - ] - ); + plugins = map toPluginModule ( + with pkgs.fishPlugins; + [ + done + fzf-fish + fifc + autopair + colored-man-pages + fishbang + sponge + ] + ++ [ + pkgs.personal.fishPlugins.ghq + pkgs.personal.fishPlugins.tide + ] + ); 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";