This document explains how to update various dependencies used in the nix configuration.
Packer is used for creating machine images and is defined in nix/packages/packer.nix.
- Bump
versioninnix/packages/packer.nix. - Set
hash = lib.fakeHash;, or an empty string. - Run
nix build .#packer, then copy the hash from the error intohash. - Do the same for
vendorHash. - Run
nix flake check -L.
- Always check the Packer changelog for breaking changes
- Packer uses Go, so ensure compatibility with the Go version specified in the flake inputs
- The current Go version is specified in
flake.nixundernixpkgs-go124input - If updating to a major version, test all packer templates (
.pkr.hclfiles) in the repository
Similar patterns can be followed for other dependencies defined in the nix packages. Always:
- Check for breaking changes in changelogs
- Update version numbers and hashes
- Run local tests
- Verify functionality before creating PR