tree: ab6ae5fe6252e1094fcbe842959385df0f7e8306 [path history] [tgz]
  1. npins/
  2. flake.nix
  3. make-shell-for-system.nix
  4. OWNERS
  5. README.md
  6. shell.nix
tools/nix/README.md

NixOS dev environment

Note: this is not used in production.

Getting and using a shell

To get a shell with this env:

$ nix-shell

or

$ nix develop

To run a command in this env, you can’t use nix-shell --run, but instead:

$ NIX_SHELL_RUN='...' nix-shell

To set up clangd with remote indexing support:

  1. $ NIX_SHELL_RUN='readlink /usr/bin/clangd' nix-shell
  2. Copy the path into your editor config

Updating dependencies

Periodically, we'll want to update dependencies to keep them relatively fresh. To do that:

$ nix run github:NixOS/nixpkgs\#npins -- update

Then commit the new sources.json.

Rolling back dependencies

If something breaks due to a bad deps update, rolling back is as simple as reverting to an earlier version of sources.json.