diff --git a/docs/nix_dev_env.md b/docs/nix_dev_env.md --- a/docs/nix_dev_env.md +++ b/docs/nix_dev_env.md @@ -132,6 +132,12 @@ - [Services deployment](./nix_services_deployment.md) - [Tunnelbroker](./nix_services_deployment.md#tunnelbroker) +## Development Environment workflows + +- [Nix development workflows](./nix_workflows.md) + - [Updating Nixpkgs](./nix_workflows.md#updating-nixpkgs) + - [Pushing development packages to Cachix](./nix_workflows.md#pushing-development-artifacts-to-cachix) + ## Using alternate shells with Nix Alternate shells such as zsh or fish can also be used with Nix. To use an alternate shell, run: diff --git a/docs/nix_workflows.md b/docs/nix_workflows.md new file mode 100644 --- /dev/null +++ b/docs/nix_workflows.md @@ -0,0 +1,33 @@ +# Nix + +## Updating Nixpkgs + +Nixpkgs is the offical package repository, and provides a large repository of software. + +To update our pin of Nixpkgs: + +``` +nix flake lock --update-input nixpkgs +``` + +## Pushing development artifacts to Cachix + +Some of the software we use has very specific version requirements. These derivations will not be available through Nixpkgs, thus we need to provide them through our own cache. + +### Authorizing with Cachix + +To setup to auth for cachix: + +``` +nix shell nixpkgs#cachix +cachix authtoken +``` + +### Pushing development shell to Cachix + +To push development artifacts to Cachix: + +``` +nix build .#devShells.default +cachix push comm ./result +```