diff options
author | William Carroll <wpcarro@gmail.com> | 2020-01-06T14·54+0000 |
---|---|---|
committer | William Carroll <wpcarro@gmail.com> | 2020-01-17T10·56+0000 |
commit | 7175d230c2cb2e5d90a25bcbd012ed75eaa96860 (patch) | |
tree | b4cad1f5b33e0b7be9b8bb77eaf8dfe5d5dcd506 /fish/default.nix | |
parent | 73e988c29818dfb679e26d08aded8816b2e2f37c (diff) |
Nixify fish configuration
This isn't 100% usable, but it works. You can build it with `nix-env` and then run it with `wpcarros-fish`.
Diffstat (limited to 'fish/default.nix')
-rw-r--r-- | fish/default.nix | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/fish/default.nix b/fish/default.nix new file mode 100644 index 000000000000..d5ec372a5dea --- /dev/null +++ b/fish/default.nix @@ -0,0 +1,52 @@ +{ pkgs ? import <nixpkgs> {} , ... }: + +# TODO: Is it appropriate to put programming language dependencies here? Should +# I have a bin dependency for every fish `abbr` and `alias` that I use? What +# makes the most sense? + +# TODO: Some of the abbreviations / aliases depend on binaries and some depend +# on files (e.g. ~/.config/nvim/init.vim). How should I handle the file +# dependencies? + +# TODO: Support symlinking config.fish to ~/.config/fish/config.fish using Nix. + +let + fishBinPath = pkgs.lib.strings.makeBinPath (with pkgs; [ + # TODO: Support fasd instead of autojump. + # fasd + direnv + autojump + fzf + fd + xclip + bat + neovim + ripgrep + sdcv + exa + pass + networkmanager + google-chrome + docker + elixir + clojure + gnupg + git + tmux + # This is not that same as `hub`. + # git-hub + mercurial + stack + kubernetes + circleci-cli + nix # Really? + apt # Really? + pacman # Really? + ]); +# TODO: It's difficult to test if the `--init-command` is working since fish +# persists functions, abbreviations, aliases between sessions so it's easy to +# get tricked by false-positives. +in pkgs.writeShellScriptBin "wpcarros-fish" '' + export PATH="${fishBinPath}:$PATH" + exec ${pkgs.fish}/bin/fish --init-command 'source ${ ./functions.fish }' +'' |