summary refs log tree commit diff stats
path: root/user
diff options
context:
space:
mode:
Diffstat (limited to 'user')
-rw-r--r--user/settings/development/base.nix18
1 files changed, 17 insertions, 1 deletions
diff --git a/user/settings/development/base.nix b/user/settings/development/base.nix
index a1ebca38..9de20fc4 100644
--- a/user/settings/development/base.nix
+++ b/user/settings/development/base.nix
@@ -2,7 +2,13 @@
 , lib
 , pkgs
 , ...
-}: {
+}:
+let
+  direnvHook = pkgs.runCommandLocal "direnv_hook" { } ''
+    ${pkgs.direnv}/bin/direnv hook zsh > $out
+  '';
+in
+{
   home.packages = with pkgs;
     [
       shellcheck
@@ -31,4 +37,14 @@
       ripgrep = super.ripgrep.override { withPCRE2 = true; };
     })
   ];
+
+  programs.direnv = {
+    enable = true;
+    nix-direnv = {
+      enable = true;
+    };
+  };
+  programs.zsh.initExtra = ''
+    source ${direnvHook}
+  '';
 }