env: Broke os detection into modules.