Storage optimization: Difference between revisions
imported>Turion m Improve formatting, wording and grammar |
imported>Cransom nix-shell silently ignores --add-root, nix-instantiate is the right tool. |
||
| Line 87: | Line 87: | ||
When you invoke <code>nix-shell</code> with | When you invoke <code>nix-shell</code> with | ||
<syntaxhighlight lang="bash">nix-shell --indirect --add-root $DIR/.nix-gc-roots/shell.drv ...</syntaxhighlight> | <syntaxhighlight lang="bash">nix-instantiate shell.nix --indirect --add-root $DIR/.nix-gc-roots/shell.drv ...</syntaxhighlight> | ||
then you'll have a persistent environment which won't be garbage collected. It is useful when you don't want to spend time waiting for redownloads every time you enter the shell. | then you'll have a persistent environment which won't be garbage collected. It is useful when you don't want to spend time waiting for redownloads every time you enter the shell. | ||