On modern gokrazy installations, consrv starts out in PWD=/perm/consrv by
default, so the -c consrv.toml flag from main_others.go actually works on
gokrazy, too, so we don’t need main_gokrazy.go at all. Even better: this way,
the flag can be used on gokrazy, too (why not?).
Also, instead of looking for the configuration / host key in one place and then
giving up, try a number of paths in order: the flag value, /etc/consrv (so that
you can maintain the consrv configuration in extrafiles/), /perm/consrv and
consrv.toml (flag default value).
On modern gokrazy installations, consrv starts out in PWD=/perm/consrv by default, so the -c consrv.toml flag from main_others.go actually works on gokrazy, too, so we don’t need main_gokrazy.go at all. Even better: this way, the flag can be used on gokrazy, too (why not?).
Also, instead of looking for the configuration / host key in one place and then giving up, try a number of paths in order: the flag value, /etc/consrv (so that you can maintain the consrv configuration in extrafiles/), /perm/consrv and consrv.toml (flag default value).