Packaging go app with initialization stage

I’m trying to package https://github.com/knadh/listmonk - I already have a nixpkg that builds just fine, but have some questions around the idiomatic way to achieve a few things:

  1. The app relies on postgres - is it acceptable to enable postgres in the listmonk module, similar to how the gitea module does if the postgresdb option is selected?
  2. Initial deployment requires running listmonk --install - How and where should I run this as a “One type script if the db config has changed”
  3. Are there any rules on when to add a new module to nixpkgs? I see most init at PRs do not add a module, but can’t find any documentation on the dos and don’ts.