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 = {