about summary refs log tree commit diff
path: root/fish/default.nix
blob: f55e24af1cdaaa5d28c9d4d5f4a46e3e3794c18f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
{ pkgs, ... }:

# 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 }'
''