The rules for using IG or SM with one of the Inquisition armies (DH and WH) can be found in either the Daemonhunters or Witch Hunters codecies. The rules are the same in either of those two books, so you only need the codex for whichever Inquisition army you wanted to add. Sadly, the rules are not included in the Space Marine or Imperial Guard books - but you *do* need one of the IG or SM codecies for the rules on their units. Blame GW and their greed for that little tidbit.
If you want a DH or WH army with allied IG, you are severly limited on what units you may take (few vehicles, no Doctrines, etc). Your DH or WH army has no limitations on what it may take, as it's the core force.
If you want an IG army with DH or WH allies, you are instead limited mainly to FOC slots. As in, you may take 0-1 DH HQ, 0-2 DH Troops, etc. Your IG army has absolutely no restrictions on what it may take, as it's the core force.