From c7edde6ca47d5090ec25aae4e2f76bfacb0319b5 Mon Sep 17 00:00:00 2001
From: Nikita Uvarov <uv.nikita@gmail.com>
Date: Tue, 5 Sep 2017 14:21:57 +0200
Subject: [PATCH] zsh: add user nix-profile dir to fpath

Fixes zsh plugins installed to nix user profile via nixpkgs.
---
 modules/programs/zsh.nix | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/modules/programs/zsh.nix b/modules/programs/zsh.nix
index 24c5e098e..b6c2bc3a3 100644
--- a/modules/programs/zsh.nix
+++ b/modules/programs/zsh.nix
@@ -208,6 +208,9 @@ in
         ${if cfg.history.ignoreDups then "setopt" else "unsetopt"} HIST_IGNORE_DUPS
         ${if cfg.history.share then "setopt" else "unsetopt"} SHARE_HISTORY
 
+        fpath+="$HOME/.nix-profile/share/zsh/site-functions"
+        fpath+="$HOME/.nix-profile/share/zsh/$ZSH_VERSION/functions"
+
         HELPDIR="${pkgs.zsh}/share/zsh/$ZSH_VERSION/help"
 
         ${concatStrings (map (plugin: ''