From 796db387429ed05b3c139e198b1d04bafc70dfa1 Mon Sep 17 00:00:00 2001 From: Matt Snider Date: Thu, 5 Mar 2020 23:37:55 +0100 Subject: [PATCH] Update README.md with nix.conf changes needed for persistent derivations It appears that the derivations produced by nix-direnv are removed when running nix's garbage collection. Troubleshooting this issue led me to a git issue in the NixOS/nix repo [1]. Enabling both `keep-derivations` and `keep-outputs` worked for me as recommended, and now nix-direnv is working. [1]: https://github.com/NixOS/nix/issues/2208 --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 0b89d30..105fe0f 100644 --- a/README.md +++ b/README.md @@ -20,3 +20,10 @@ Then source the direnvrc from this repository in your own `.direnvrc` # put this in ~/.direnvrc source $HOME/.nix-direnv/direnvrc ``` + +For derivations to persist garbage collection, set the following in nix.conf: + +``` +keep-derivations = true +keep-outputs = true +```