1. Defines a Go binary (i.e., how to build it)
2. Defines a Docker image that uses said Go binary as an entry point
3. Defines a NixOS module that creates a systemd service that runs the Go binary (only relevant on NixOS)
4. Defines a NixOS test for the module that ensures that the NixOS module actually creates a systemd service that runs the Go binary as expected. The NixOS test framework is actually quite impressive - tests run in a QEMU VM that also runs NixOS :)
Note that only (1) and (2) are relevant to the linked article (+ some of the surrounding boilerplate).