From 21db6fe9ffc0fe7766cf4a4fe7f7c4a3d9dc1da0 Mon Sep 17 00:00:00 2001 From: NullBite Date: Sun, 21 Apr 2024 13:03:12 -0400 Subject: [PATCH] home/common/nix: install direnv --- home/common/nix.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/home/common/nix.nix b/home/common/nix.nix index b76cf6f..bb55912 100644 --- a/home/common/nix.nix +++ b/home/common/nix.nix @@ -21,6 +21,14 @@ in { } (lib.mkIf standalone { + # direnv is a tool to automatically load shell environments upon entering + # a directory. nix-direnv has an extensionn to keep nix shells in the + # system's gcroots so shells can be used after a gc without rebuilding. + programs.direnv = { + enable = lib.mkDefault true; + nix-direnv.enable = lib.mkDefault true; + }; + home.sessionVariables.NIX_PATH = "nixpkgs=${nixpkgs}\${NIX_PATH:+:\${NIX_PATH}}"; nix.registry = { nixpkgs = {