Skip to main content

Option 2: Setup Using Nix

info

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:

danger

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, remove eval "$(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

  1. Install mymove dependencies:
nix-env -i aws-vault chamber direnv bash
  1. Set up AWS services.
  2. Follow these steps to configure direnv (which was installed in Step 1).
    1. In .zshrc (or the relevant one for you), make sure the nix setup line (inserted by the nix installation) is run before the direnv hook setup.
  3. Run ./nix/update.sh.
  4. Run make deps_nix. This will install pre-commit hooks and frontend client dependencies. See the Pre-Commit guide for more information on how to use it.

Add or Update Packages

  1. Go to nix-package-search and find the package you’re looking for.
  2. When you see the version of the package you want, click on the eye icon to unfold the settings.
  3. Add or update the package to nix/default.nix.