Using Nix as an alternative for docker for reproducible build environments

bokken23
2026-02-11T17:04:05Z

As another option for creating reproducible development environments, instead of docker, Nix devshells (https://nix.dev/tutorials/first-steps/declarative-shell.html) could be used.

- Packages could be declared and build commands could be defined in a flake, which can be run on all systems without the virtualisation overhead of docker.
- The versions of the packages can be pinned by using a lock file (automatically generated by the flake)
- Commands could be automatically run upon entering the flake
- Environment variables can be set declaratively
- This would reduce the amount of commands a user needs to run to set up the development environment, thus making the package building more accessible
- This might also be used for general development environments, incidentally