Next step would be to utilize boot.binfmtMiscRegistrations to register our gorun in binfmt_misc module which is
responsible for parsing shebang scripts and binary files. Drop the following lines in to your configuration.nix:

What does this configuration do? recognitionType tells binfmt to make a decision based on file extension,
magicOrExtension tells it to look for .go extension, interpreter specifies which binary to invoke,
openBinary corresponds to O flag of binfmt (which I dont fully understand tbh), matchCredentials tells kernel to run
interpreter with permissions set on original script. For more information on binfmt please do check out these amazing kernel docs.

Now lets simply run sudo nixos-rebuild --switch and after everything is done lets give it a try.