Skip to content

Latest commit

 

History

History
26 lines (20 loc) · 935 Bytes

default-shell.md

File metadata and controls

26 lines (20 loc) · 935 Bytes

Cookbook: Using locolamp in the default shell

In the "Quick Start", we used nix-shell to open a subshell with a suitable environment. We will always have to open a subshell before running commands like mysql or composer. I like this because it's easy to switch between different configurations, however... if you always use one configuration, then this could feel inconvenient.

You can bring the full locolamp stack into your default shell (so that nix and nix-shell aren't needed on a day-to-day basis):

$ git clone https://github.com/totten/locolamp ~/src/locolamp
$ nix-env -i -f ~/src/locolamp/

And optionally load the environment variables from loco.yml at startup by adding this to the shell initialization script (~/.profile or ~/.bashrc):

eval $( loco env --cwd ~/src/locolamp/ --export )

Note: Upgrades won't be automatic; so you may want to periodically reinstall the profile.