Option 2: Setup Using Nix
If you prefer to setup using Homebrew, go to Option 1: Setup Using Homebrew.
Initial Setup
Read the overview of Nix in the Truss Engineering Playbook, and follow the instructions in the playbook.
Clean Up Local Environment
This section is only if you had previously set up any of these tools/packages. It is also optional, with the following the caveat of this note:
If you need any of the packages/tools for other things that you won't use nix
for, you can set things up so that they both work side by side, but you'll just have to set up your PATH
properly. And even then, there may be other steps necessary which aren't documented here.
Disable or uninstall nodenv
, asdf
, or any other version switchers for mymove
:
To disable
nodenv
, removeeval "$(nodenv init -)"
from.zshrc
(or your shell's config file)To uninstall
nodenv
, follow these instructions.To uninstall
asdf
, follow these instructions.Also, remove the following lines from
.zshrc
(or your shell’s config file):# remove these lines
export GOPATH=~/dev/go
export PATH=$(go env GOPATH)/bin:$PATH
Install Dependencies
- Install
mymove
dependencies:
nix-env -i aws-vault chamber direnv bash
- Set up AWS services.
- Follow these steps to configure direnv (which was installed in Step 1).
- In
.zshrc
(or the relevant one for you), make sure thenix
setup line (inserted by thenix
installation) is run before thedirenv
hook setup.
- In
- Run
./nix/update.sh
. - Run
make deps_nix
. This will installpre-commit
hooks and frontend client dependencies. See the Pre-Commit guide for more information on how to use it.
Add or Update Packages
- Go to nix-package-search and find the package you’re looking for.
- When you see the version of the package you want, click on the eye icon to unfold the settings.
- Add or update the package to
nix/default.nix
.