It's the Department of Homeland Security's responsibility, but that doesn't mean that anyone necessarily failed at their job. Just that it's a very difficult job.
The NSA will certainly contribute tools and expertise when needed to any US government agency/department.
The DHS tool "Einstein" is an intrusion detection system that detected the breach.
CIA records are assumed to not be held by the OPM, for the reason that they are the ones that are most sensitive if stolen.