default environment
with a project’s environment.
Create your default $HOME environment
First, create your default environment by following
default environment tutorial.
Install packages
Now let’sflox install tools that will be useful on any
system regardless of the project.
Here we are installing curl, gitFull, gnupg, inetutils, tree, and
vim.
flox list:
flox activate.
Layering a project environment
Now that we have our tools in thedefault environment we can layer on a new
environment that brings in project-specific dependencies.
For this example we will use a publicly accessible Node project called
material-ui.
Let’s clone the example project to our home directory and enter the project’s
directory:
flox init from the material-ui directory that we are in.
yarn so let’s install it with
flox install.
material-ui Flox environment and start material-ui’s
development server.
yarn) and the
tools we need to do development on any project (vim, git, etc)!
You can layer as many environments as you want.
If two environments contain the same package,
Flox will use the package from the last environment activated.
You can use flox envs to see the environments you have activated.