fish: store config in out-of-store symlink
1 file changed, 10 insertions(+), 22 deletions(-)
changed files
M user/settings/fish.nix → user/settings/fish.nix
@@ -1,11 +1,15 @@ { + config, pkgs, lib, ... }: let inherit (builtins) map; - inherit (lib) getAttrs; + 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;@@ -35,25 +39,6 @@ }; } ] ); - interactiveShellInit = '' - bind \es __ghq_repository_search - # don't bind ctrl-t, it does nice things on macOS/BSD - set FZF_CTRL_T_COMMAND - set --export FZF_DEFAULT_OPTS '--cycle --layout=reverse --border --height=90% --preview-window=wrap --marker="*"' - fzf_configure_bindings --directory=\cx\cf - - set --global hydro_multiline true - set --global hydro_color_pwd 00AFFF - set --global hydro_color_git 5FD700 - set --global hydro_color_start FF00FF - set --global hydro_color_error D70000 - set --global hydro_color_prompt 5FAF00 - set --global hydro_color_duration 87875F - - if set --query ZED_TERM - set -x EDITOR "zed -w" - end - ''; 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";@@ -71,11 +56,14 @@ }; }; xdg.configFile."fish/completions" = { recursive = true; - source = ./fish/completions; + source = direct_symlink "/user/settings/fish/completions"; }; xdg.configFile."fish/functions" = { recursive = true; - source = ./fish/functions; + source = direct_symlink "/user/settings/fish/functions"; + }; + xdg.configFile."fish/conf.d/user_config.fish" = { + source = direct_symlink "/user/settings/fish/config.fish"; }; programs.nix-your-shell = {