There are various ways of installing NixOS, and I found it somehow confusing that the docs are scattered all over the internet, not making it easy for beginners to get started.
Not a lot of excitement is happening here and the main part of the deal is that setup-nixos.sh file in the same working directory.
There are, generally speaking, two main components to each Packer configuration file, whether you write it in the HCL language or the JSON format2.
The first component is the source block, specifying which cloud provider you are targeting and where will you store your final snapshot image3.
Now, funny enough, the github.com/hetznercloud/hcloud will not be an accessible internet URL. Unlike, for example, Go packages, these are arbitrary names assigned to the plugin.
Once you define your plugins, you got to import its files using packer init. This command needs to run in the same directory as your *.pkr.hcl file.