Government has both pros and cons. Two advantages are (a) less age discrimination than in the tech world and (b) there is good work/life balance. A con is that it generally pays less than the tech world.
Btw, Federal Government retirement now (FERS) is mostly their TSP, which is like a 401(k) plan. People hired after roughly 1985 do not get the previous cushy inflation-indexed pension (CSRS).