Abstract
## Background
Creating consistent environments has been something that most engineering teams strive for. The closer you can get your development environment, to your CI environment, to your production environment, the more likely you are to catch bugs.
At the same time, we want to onboard developers fast and get them started as soon as possible, reducing friction when starting to code on a new project.
Like many developers, I have been leverage containers to help with this. Containers are a fantastic tool to have and provide main benefits. However, many containers/images have issues with being reproducible.
I would like to show a package manager called Nix and show how we can use that to have more reproducible and consistent. We will take an existing Go project and see how we can make some development tools easily accessible, without the need for a `tools.go` file, for tools like mockgen.
## Content
In this talk, we will briefly introduce Nix, and then we will talk about what Nix flakes are and how we can use them. Then we will create a development environment for an existing Go project using Nix flakes. The next part will compare it against Docker, particularly against Docker dev containers.
In the final part of the talk, I will show a quick example of how we can look to extend what we have done into our CI environment, to have a more consistent development and CI environment. We will again take an existing Go CI pipeline using GitLab CI, "nixify" and see what benefits it can provide.
## Contents of talks
We will cover the following topics (in this rough order):
- What is Nix?
- Why use Nix with Go?
- How to create a Go development environment with Nix
- A quick demo
- Compare it against Docker
- How to use Nix in CI?
## Slides on the Author's website
https://haseebmajid.dev/slides/go-lab-reproducible-envs-with-nix/#/