diff --git a/shell.nix b/shell.nix
index f3d2750edd68e4861e6d0700e0259c1ce86f817a..af006f754fda2b85f2e837c3aca71ac2cfcf5f71 100644
--- a/shell.nix
+++ b/shell.nix
@@ -3,7 +3,9 @@ let
 in
 { pkgs ? release2105 }:
 pkgs.mkShell {
-  NIX_PATH = "nixpkgs=${pkgs.path}";
+  shellHook = ''
+    export NIX_PATH="nixpkgs=${pkgs.path}";
+  '';
   buildInputs = [
     pkgs.morph
     pkgs.vagrant